Billy Korando πŸƒβ˜•οΈ 🐈🐈 Profile picture
#Java Developer Advocate @Oracle β˜•οΈπŸ₯‘. @KCJUG co-organizer. Formerly; @IBM, @KeyholeSoftware, @niprcom. Opinions are my own. Trolled by @briseida_ko πŸ’

Jul 29, 2022, 7 tweets

Hey #Java Developers,

It's your Friday #SipOfJava thread! 🧢🐈

Records are one of the most important new language features added to Java in recent releases and are central to Java's story on Data Oriented Programming. Let's take a look at how to use Records!

1/7

Let's first understand what Records are, and how they can be very helpful when handling data transformation within a method's body!

2/7

Serialization causes a lot of headaches within Java. Because of the constraints imposed on Records, Records address many of the pain points of Serialization in Java. Let's see how.

3/7

Serialization libraries are also starting to support Records, allowing for easy serializing and deserializing of Records over mediums like HTTP and as messages. Let's look at how three popular libraries support Records.

4/7

Because Records are immutable, they will never be an option for entities in JPA. They however can be a great option for JPA projections. Let's look at how to accomplish that.

5/7

Here are three more helpful tips to make the most out of using Records in your applications.

6/7

Happy coding!

7/7

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling