~/talk

#OOP vs Data Oriented Programming Which One to Choose

Talkat Devnexus 2025 · 2025-03-04..03-06· [software-architecture, java]
slides:none on file

Argues that choose OOP when you need runtime polymorphism and extensibility but prefer data-oriented code when third‑party types force parallel hierarchies. Shows a concrete Java example: a trade model (Sell/Buy records) + interceptor implementations that became messy with reflection and factory logic; replaces them with sealed interfaces, records and a pattern‑matching switch to get compile‑time errors when a new Trade appears. Result: simpler, clearer code, fewer classes, tradeoff is less plug‑in extensibility but easier maintenance and earlier errors.

AI-written summary · about

  1. 0:00Introduction to OOP vs DOP
  2. 1:49OOP pillars and polymorphism
  3. 13:27When OOP becomes problematic
  4. 23:25Code smell and parallel hierarchies
  5. 33:46Tradeoffs in design principles
  6. 44:48Simplifying with sealed interfaces
  7. 55:46Choosing OOP vs DOP wisely
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.