History of Model View Controller (MVC):
MVC is really old and was first described in 1979 by Trygve Reenskaug, then working on Smalltalk at Xerox PARC. Being over 30 years ago does not mean it's dead, far from it... Today MVC is used in most modern web and GUI frameworks, including:
- Ruby On Rails: A popular Ruby web-framework
- Apple Cocoa: Apple's framework for developing Mac OS and iOS applications
- ASP.Net Framework: Microsoft's web-framework for implementing web applications
- Apache Struts: A popular Java web-framework
- And many many more languages and frameworks
The main objectives of MVC:
Model-View-Controller as the name applies considers three roles:
-
Model: manages the behavior and data of the application domain
-
View: represents the display of the model in the UI
-
Controller: takes user input, manipulates the model and causes the view to update
There isn't a standard definition of the MVC pattern and many frameworks
use a slightly different version. This said there is a core idea of
what MVC tries to achieve:
-
Separating the presentation from the model:
Enables implementation of different UIs and better testability
-
Separating the controller from the view:
Most useful with web interfaces and not commonly used in GUI frameworks
Enables implementation of different UIs and better testability
Most useful with web interfaces and not commonly used in GUI frameworks