Hello Friends!!!
In this blog, we will learn about Design Patterns which are used in Magento 2 to manage projects.
What is the Design Pattern in Magento 2?
Design Pattern is a way to represent your useful code and project in a well-defined manner.
By using a Design Pattern, we can encapsulate the large data in an organized way for our project.
In Magento 2, there are many standard patterns that are used in Magento 2 projects or modules.
Here is the list of the most commonly used design patterns in Magento 2.
- Magento2 Repository Design Pattern
- Magento2 Code Generation And Factory Design Pattern
- Magento2 Proxy Design Pattern And Code Generation
- Object Pool Pattern
- Magento2 Plugins OR Interceptor pattern and code generation :
Refer to this blog also Magento2 – Create and Use Plugins - Dependency Injection
- Service Contract
- Events and observers:
Refer to the following blogs:
Plugins, Observers, and Preference in Magento2
How to create custom observers in magento2
Observers in Magento 2
Use Observer In Magento - Preferences:
Refer to the following Blogs:
Create a preference for protected type methods.
Plugins, Observers, and Preference in Magento2 - Strategy design pattern
- Virtual Types
- Injectable/Non-Injectable Object
Hope this will be helpful.
Also, please find the complete list of Magento 2 tutorials here.
Friends, to learn about more concepts in Magento 2, Stay tuned with us and keep learning.
Thanks 🙂
2 comments
Thanks for letting us know about this.
Now, We have fixed this.