Technically DDD
summary
PHP-focused walkthrough of Domain-Driven Design technical building blocks that implements concrete rules: start by enforcing “meetings cannot end before they start” inside a Meeting entity, extract a MeetingDuration value object using DateTimeImmutable, replace arrays with a Program and ProgramSlot value objects, and add an overlaps check to prevent double-booking. Shows fixing two bugs (overnight slots and boundary-equality logic), prefers throwing exceptions in constructors to “make the incorrect inexpressible,” and recommends the iterate-then-refactor pattern: implement rule in entity, extract value object, then refine.
AI-written summary · about
chapters (17)
- 0:00Introduction and speaker intro
- 1:25What is Domain-Driven Design
- 6:55Value objects in DDD
- 14:43Entities and their role
- 18:39Domain services explained
- 22:13DDD technical building blocks recap
- 22:35Quiz on DDD concepts
- 26:14Case study introduction
- 27:19Implementing first rule in entity
- 30:59Extracting value objects from rules
- 33:31Handling complex business rules
- 44:18Exceptions in constructors debate
- 46:51Final refactored meeting code
- 47:41Room as a value object or string
- 51:38Working with client domain knowledge
- 54:10When to create value objects
- 55:37Recommended DDD resources
