Avoiding the mud
summary
Argues for concrete, testable decisions: use command objects like RequestAbsenceCommand and CancelAbsenceCommand to capture UI input and validation, create presentation objects such as AbsenceView for template logic, give entities behavior (call entity.cancel(reason) to set status/date), define repository interfaces and implement them with Doctrine adapters, dispatch explicit domain events like AbsenceCancelled instead of relying on Doctrine lifecycle events, and split bundles by decoupled domains (HR vs recruitment) while keeping controllers in the application layer.
AI-written summary · about
chapters (19)
- 0:00Introduction and talk overview
- 2:33Fragility in Symfony applications
- 4:15Splitting domain and bundle code
- 7:13Separating user input from entities
- 10:00Introducing command objects
- 13:59Reducing technical complexity
- 14:20Passing entities to templates
- 16:07Moving logic from templates to entities
- 18:56Introducing view objects
- 21:45Protecting entity state
- 24:00Decoupling controllers from entities
- 25:13Hiding persistence from domain
- 27:44Implementing repository interfaces
- 30:11Using domain events instead of Doctrine events
- 31:15Deciding bundle size and structure
- 33:43Splitting bundles by domain boundaries
- 36:27Separating user management
- 37:55Key takeaways and DDD principles
- 38:59Q&A and closing remarks
