What is DOP? |
A Lengthy Example |
That was DOP! |
The goal of any programming paradigm is to manage complexity.
-
complexity comes in many forms
-
not all paradigms handle all forms equally well
⇝ "It depends"
Everything is an object
-
combines state and behavior
-
hinges on encapsulation
-
polymorphism through inheritance
Works best when defining/upholding boundaries.
Note
|
|
Great use cases for OOP:
-
boundaries between libraries and clients
-
in large programs to enable modular reasoning
Consider a data-oriented approach for:
-
smaller (sub)systems
-
focused on data
Brian Goetz formulated them in June 2022:
Data Oriented Programming in Java
I offered an updated version in May 2024:
Data Oriented Programming in Java - Version 1.1