Final Class Aggregate
summary
Defines an aggregate as a bounded object graph that enforces rules and transactional consistency via a root entity, shows a meeting-with-registrations aggregate and explains why large aggregates (think hundreds or thousands of registrations) hurt performance and persistence. Uses plain SQL, in-memory repositories and mocks to demonstrate testing tradeoffs, and proposes context objects (pure use‑case classes) to make implicit context explicit and let unit tests avoid brittle mocks.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:15What Exactly Is an Aggregate
- 6:37Common Patterns
- 7:13Can Value Objects Implement Behavior
- 16:10Rules for Working with a Grits
- 19:30Storing Aggregates
- 23:45Context Functions
- 25:10Unit Test
- 25:53Registering for a Meeting
- 30:06White Box Testing
- 32:10Downsides of Aggregates
- 39:42Conclusion
- 43:24Keep Your Aggregates Small
related talks
59mHow much database abstraction do I need?
01h 03mUnbreakable Domain Models
29mprooph/micro and FPP - less is more
27mConfessions of a Backend Developer
02h 53mPractical design patterns in PHP (Part 3)
44mAll the cool kids...
54mFrom domain to code: a practical approach
50mA live dialogue "DDD: You're doing it wrong"
