In symfony2, the services using Singleton patterns. Doctrine uses Unit of work patterns. I wonder a lot of design patterns may be used in symfony2. I think it will be useful to have better understanding of design patterns. My question is what are the design patterns used in symfony2?
Symfony is based on the classic web design pattern known as the MVC architecture, which consists of three levels: The Model represents the information on which the application operates--its business logic. The View renders the model into a web page suitable for interaction with the user.
Struts is based on model 2 MVC (Model-View-Controller) architecture. Struts controller uses the command design pattern and the action classes use the adapter design pattern. The process() method of the RequestProcessor uses the template method design pattern.
Design Patterns are best software practices used by Software Developers in solving recurring problems in Software Development. They aren't code-related but rather a blueprint to use in designing a solution for a myriad of use cases.
Three Types of Design Patterns (Behavioral, Creational, Structural) Distinguish between Behavioral, Creational, and Structural Design Patterns.
I just created this graph. As a guideline for a course on Sf2.
I think you can find any design pattern exploring Symfony2 components. For example, Form component provide you with Factory, Facade, Composite, Builder, Flyweight pattern examples.
And don't forget about the main Dependency Injection pattern used in Symfony2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With