What is Design Pattern

Design pattern is a software engineering part.Magento use many type of design pattern.
(i) MVC Pattern:- MVC stand for Model View Controller.
Model is used for database logic.
View is used for presentation logic.
Controller is used for routing.

(ii) Front Controller Pattern:- It has a single entry point (index.php) for all of it’s requests.

(iii) Singleton Pattern:-It can be only one instance of a given class. It checks instance is already created or not if created then use this otherwise create new instance.
Example:- Mage::getSingleton(‘catalog/session’);

(iii) Factory Pattern:-The Factory Method is used to instantiate classes in Magento.
Example:- Mage::getModel(‘catalog/product’);

(iv) Registry Pattern:-It is used for transferring data between scopes when they cannot be passed on. It is a global scoped container for storing data. All the singletons are stored in the internal registry.
Example:- Mage::register($key, $value); It is used for storing value.
Example:- Mage::registery($key); It is used for getting the store value.
Example:- Mage::unregister($key); It is used for unregister the variable which is in the registry.