Hexagonal architecture
summary
Argues that hexagonal ports and adapters architecture keeps the domain core independent of Symfony, Doctrine and delivery mechanisms so use cases live as plain command objects handled by command handlers; suggests using a command bus (SimpleBus or Tactician), interfaces in the core and concrete MySQL/Doctrine or in-memory repository adapters in infrastructure. Shows this reduces slow tests, lets tests run against fast in-memory stores, enables reusing the same logic from web or CLI, and makes persistence interchangeable.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:00The problem with MVC
- 2:58Framework dependencies
- 5:34Encapsulation vs abstraction
- 8:25Coupling and reusability
- 13:59The core application
- 17:17Layers and dependencies
- 21:39Ports and adapters
- 25:49Messages and handlers
- 29:02Managing persistence
- 32:43Dependency inversion
- 35:40Conclusion and Q&A
