Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在symfony2中,使用单例模式的服务。Doctrine 使用工作单元模式。我想知道symfony2中可能会使用很多设计模式。我认为更好地理解设计模式会很有用。我的问题是symfony2 中使用的设计模式是什么?
我刚刚创建了这个图表。作为 Sf2 课程的指南。
我认为您可以找到任何探索 Symfony2 组件的设计模式。例如,Form 组件为您提供了 Factory、Facade、Composite、Builder、Flyweight 模式示例。
并且不要忘记 Symfony2 中使用的主要依赖注入模式