Data-Oriented Programming is a programming model paradigm, alternative to Object Oriented Programming, that allows you to organize your application code differently. Its goal is the same as Object Oriented Programming: enabling the extension of a given object model by adding new types and new behavior. Since Java is an Object Oriented language, it uses tools already there such as records, sealed types (mostly interfaces), exhaustive switch expressions, and pattern matching.
This hands-on lab gives you a simple application as a starting point and uses a step by step approach to guide you through a Data-Oriented Programming refactoring. Once this refactoring is done, it shows you how to add new types and behavior so you can compare with the Object Oriented approach. By the end of this workshop, you'll have a better understanding of Data-Oriented Programming and how and where you can apply its principles in your application.
Type: Hands-on Lab (90 min)
Track: Core Java Platform
Audience Level: Expert