Overly Attached ORM
summary
Explains reducing coupling to Doctrine in a Symfony2 app by making repositories and entity interfaces and turning concrete repository classes into separate bridge bundles. Describes a custom bridge entity manager that routes persist/flush to the appropriate backend so a Doctrine bundle can be swapped for an Instagram API bundle without changing business logic, enabling transparent data-source replacement and easier testing by switching bridges during builds.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:03Project context and assumptions
- 2:52Slow database queries problem
- 6:27Rewriting repositories as services
- 9:48Using interfaces in code
- 14:32Bridge pattern introduction
- 18:55Data persistence and flushing
- 21:50Testing repositories and bridges
- 24:25Changing data sources in tests
- 26:57Summary and conclusions
related talks
25mCode decoupling from Symfony (and others frameworks)
21mLaravel Doctrine: A Data Mapper Approach
59mDoctrine ORM Good Practices and Tricks
38mHow to Effectively Isolate Layers?
59mHow much database abstraction do I need?
34mDon't Let the Framework Stand in Your Way
44mDon't Be a Slave to Doctrine Anymore
02h 10mLet's play a game: No extends. Advanced OOP with Symfony 3
