Model-View-Controller or MVC is an architectural pattern for structuring software development in the three units of architecture patterns. In our article on CakePHP, we wrote that it follows the pattern of Model-View-Controller (MVC). The aim of Model-View-Controller is to provide a flexible program design, which facilitates subsequent alteration or extension, and allows reuse of individual components.
Classical Architecture Patterns of Model-View-Controller (MVC)
The three components of Model-View-Controller vary depending on the realization of different degrees from each other:
Model : Model is a component of Model-View-Controller which contains data to be displayed and optionally (depending on the implementation of Model-View-Controller pattern) and the business logic . It is independent of presentation and control.
View : This part of Model-View-Controller is responsible for the presentation of the required data from the model and to receive user interactions.
Controller : The controller of Model-View-Controller manages one or more views, which it receives them user actions, evaluates them and act accordingly.
Model-View-Controller pattern is implemented differently in different programming needs. This may vary depending on the application, the controller part of Model-View-Controller can be removed or relocated in the model. The practice and implementation of Model-View-Controller varies depending on the personal style of programming, web servers, programming languages, frameworks, the use of unit testing and the project requirements.
Current implementations of Model-View-Controller (MVC)
Widgets are called components of graphical interfacess. Widgets uses this Model-View-Controller in some way or the other, that is all components of Model-View-Controller might not be used for Widgets. Model-View-Controller pattern for Web applications is distributed servers and browsers, making it more complex than the classic Model-View-Controller pattern.
Model-View-Controller is not only used for developing GUI of Widgets, Model-View-Controller is used for Microsoft Foundation Class Library (MFC), Adobe Flex and many more GUI.
Tagged With model view controller overview