Curing you Domain Model Anemia with Effective & Clean Tips from the Real World
summary
Live coding shows a concrete DDD pattern: an OrderNumber value object that validates in its factory, an OrderItem embeddable stored via JPA ElementCollection, and an OrderItems wrapper returning ImmutableList to prevent external mutation. Code uses Guava utilities, Java 8 streams/functions and a JPA AttributeConverter to map custom types to DB columns. The claim is practical: push validation into constructors/factories, remove setters, fail fast to reduce NPEs, and add behaviors (discount/shipping) via an apply(Operation) pattern — the demo compiles and runs.
AI-written summary · about
chapters (6)
- 0:00Introduction and background
- 3:52Software and domain mindset
- 10:47Domain-driven design concepts
- 15:34Live coding: Entities and values
- 34:06Encapsulation and API design
- 49:42Scaling and final thoughts
related talks
02h 31mSlice & Dice your Monolith with Domain Driven Design
59mDomain-Driven Design - Where Rubber Meets the Road
42mHigh-Speed DDD (revisited)
01h 00mApplied Domain-Driven Design Blue Prints for Java EE
25mOOPs!... I Did it Again: When Good Objects Go Toxic
39mLessons Learned from 10+ Years with Domain Driven Design
43mArchitecture antipatterns and how to beat them 1/2
50mAll Models Are Wrong: Lessons from Real DDD Projects
