Magento Design Pattern
The list of design pattern Which Magento used.
Magento follow Model/View/Controller design pattern.
Ensure that only one instance of a class is created and Provide a global access point to the object.
$category = Mage::getSingleton('catalog/session');
Creates objects without exposing the instantiation logic to the clientand Refers to the newly created object through a common interface.
$product = Mage::getModel('catalog/product');
It will provide you one way to store your information throughout your application.
$currentCategory = Mage::registry('current_category');
Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Reuses and shares objects that are expensive to create.
$id = Mage::objects()->save($object);
$object = Mage::objects($id);
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
It will react as a to access the helper classes.
Provide an object as a surrogate for the lack of an object of a given type. / The Null Object Pattern provides intelligent do nothing behavior, hiding the details from its collaborators.
Aadd additional responsibilities dynamically to an object.
Hope you like article. Thanks for reading.