Getting started with model-view-controller
Remarks#
Model–view–controller (MVC) is an architectural pattern in software design, not a design pattern, which describes a way to structure our application and the responsibilities and interactions for each part in that structure. [1]
Historically, MVC was first described in 1979 by Trygve Reenskaug as a way to approach (desktop) GUI (graphical user interface) design. Reenskaug described his early Smalltalk and object oriented conceptual efforts as follows: [2]
“MVC was conceived as a general solution to the problem of users controlling a large and complex data set. The hardest part was to hit upon good names for the different architectural components. Model-View-Editor was the first set. After long discussions, particularly with Adele Goldberg, we ended with the terms Model-View-Controller.”
The wild popularization of MVC for web applications is due to its inclusion in two frameworks that became immensely popular: Struts and Ruby on Rails. These two environments marked the way for the hundreds of frameworks created later. [3]
Advantages:
- It’s immensely popular.
- It provides strong routing when used in conjunction with the Front Controller pattern. (web-based MVC)
- It achieves separation of concerns.
- It makes collaboration easier as there’s less to be concerned with.
- It makes it easier to follow how complicated applications work, thereby reducing bugs when contributors contribute.
Disadvantages:
- Abstraction can overly-complicate relatively simple applications.
- The learning curve can be difficult as there’s many concepts involved.
- Many frameworks describe themselves as MVC, yet differ in implementation, thus one developer will have different habits from the next.
Installation or Setup
Detailed instructions on getting model-view-controller set up or installed.