Initially created for desktop environments, the
Model-View-Controller (MVC) is an architectural model that is used in software
development, mainly, web development. Throughout the IT industry, its adoption
is widespread, being a one of many standards. It is pervasive in web
development frameworks, be it ASP.NET MVC, Django, CakePHP, etc.
The components of this model consist of the
Model, the Controller and the View.
Firstly, the Model can be considered as the
core in this architectural model. This component represents the data concerned
in all relevant operations and related logic. It is the endpoint of database
operations and is the butler for all relevant calls for data, and in-kind
Next, the Controller can be thought of as the interface
between the View and the Model. It manages business logic relevant to the View,
with data access via the Model. For example, it renders the data collected from
the Model onto the View. Data produced in the View can be manipulated or stored
via the Model. Most non-data business functions are relegated to this
For the last component, the View simply is the
presentation layer with which the user interacts; the user interface.
Functionality in this layer composes of layout designs and styling. No business
logic or data functions should be present.
A distinction that has to be made about the
MVC architectural model is that views and controllers are usually tailored for
each other. The Model can remain static throughout. Many different iterations of
user interfaces could be developed for different needs in spite of a central,
unchanging data source.
There are a myriad of advantages intrinsic to
MVC. Conspicuously, multiple views/controllers can be tailored for different
needs, code updates and modification becomes easier because of the presence of
low coupling. High cohesion is another boon for MVC. This allows for separation
of concerns for organizations allowing very specialized developers to work on
the design, work and database operations separately.
One of the many web development frameworks that
incorporates this model, is CakePHP. It is conceptually based on Ruby on Rails,
a server-side web development framework written in a programming language,