Data-oriented Programming in Java
summary
Argument: Java gains a practical path to data oriented programming by using records for immutable DTOs, sealed interfaces to enumerate outcomes, and pattern matching plus switch expressions to deconstruct types and guarantee exhaustiveness. Examples include modeling Optional as Some/None, a REST search with three result cases, and record constructors for boundary validation. Caveats: records do not fit JPA entities, JVM optimizes type checks, and migration is incremental rather than a rewrite.
AI-written summary · about
chapters (7)
- 0:00Introduction and speaker background
- 2:57Evolution of Java applications
- 7:34Introducing data-oriented programming
- 12:07Java support for data-oriented programming
- 27:10Implications for data-oriented programming
- 33:56Modeling data as first-class citizen
- 39:16Summary and Q&A
related talks
53mData oriented Programming in Java
31mData Oriented Programming and Matching in Java
47mData-oriented programming in Java
21mData-Oriented programming
54mData Focused programming with Pattern Matching in Java
42mBetter Modeling Through Records
54mData Oriented Programming with the JDK 19
58m#OOP vs Data Oriented Programming Which One to Choose
