From domain to code: a practical approach
summary
Shows how a domain model actually becomes running code: implement CQRS and command/query buses with Symfony Messenger, keep domain and application layers free of DB concerns, and put Doctrine plumbing in infrastructure. Recommends aggregates with cascades, Doctrine deferred explicit change tracking, UIDs generated in infra and used as primary keys, custom Doctrine types instead of embeddables, persisters that flush and dispatch events, and enforce throws PHP docs enforced by static analysis (Psalm/PHPStan).
AI-written summary · about
chapters (25)
- 0:00Intro
- 0:43Domain D Design
- 2:01Domain Definitions
- 4:43Domain Driven Design
- 7:01CQRS
- 8:46Layers
- 9:47Domain
- 14:02Abstractions
- 16:23Implementation Focus
- 18:21UUIDs
- 21:51Cascades
- 22:51Chain tracking policy
- 24:40Custom types
- 26:04Repository patterns
- 27:38Buses
- 29:29Dispatch
- 30:07The end result
- 31:30Dispatching events
- 33:40Best practice for events
- 34:24Error handling
- 37:06Treat
- 38:19Testing
- 39:54Static analysis
- 44:18Wrap up
- 46:24Questions
related talks
56mThe absolute beginner's guide to Domain Driven Design with Symfony
59mA CQRS Approach with Api Platform and Symfony Messenger
40mDDD, CQRS, Hexagonal, Onion,... Putting it together
01h 03mUnbreakable Domain Models
34mLevel up with a Microservices architecture
44mAn Introduction to Symfony Messenger
25mCode decoupling from Symfony (and others frameworks)
27mConfessions of a Backend Developer
