How Kris Builds Symfony Apps
summary
Explains a concrete architecture: HTTP maps to application via thin controllers as mapping layer, application uses services and models which map to persistence, and persistence is handled by Doctrine ODM with models kept outside bundles. Uses events heavily and dispatch app events from Doctrine preFlush to detect creates, updates and follows. Recommends JMS DiExtra annotations, JMS serializer, RequireJS for JS DI, keep query builders in repositories, implement clone constructors and IDs in constructors, and only flush once in controller.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 1:53Mapping layers concept
- 5:53Thin controllers explained
- 9:26Managers vs services
- 12:35Using events in apps
- 21:22Model as princess pattern
- 25:25Cabinets and verbs
- 25:46Contextual configuration
- 31:05JMS serializer tips
- 31:50Bundle creation guidance
- 35:11Access control voters
- 38:05Query builders in repositories
- 39:36ID and timestamp creation
- 41:47Only flush in controller
- 43:13Q&A on bundles
- 44:08Q&A on view models
- 46:14Q&A on tight coupling
- 48:00Q&A on anemic models
- 49:31Q&A on event dependencies
- 51:21Q&A on folder structure
- 52:45Q&A on flushing exceptions
