Model–view–controller (MVC) is a software design pattern for implementing user interfaces on computers. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.
2. History
Model–view–controller (MVC) is a software design pattern for
implementing user interfaces on computers. It divides a given
software application into three interconnected parts, so as to
separate internal representations of information from the ways that
information is presented to or accepted from the user.
Traditionally used for desktop graphical user interfaces (GUIs), this
architecture has become popular for designing web applications and
even mobile, desktop and other clients.
5. CONTROLLER
• The controller receives user input and makes calls to
model objects and the view to perform appropriate
actions.
• A controller can send commands to the model to
update the model's state (e.g., editing a document). It
can also send commands to its associated view to
change the view's presentation of the model (e.g.,
scrolling through a document).
• Controllers act as an interface between Model and
View components
6. MODEL
• A model stores data that is retrieved according to
commands from the controller and displayed in the
view.
• The Model component corresponds to all the data
related logic that the user works with.
• The model manages fundamental behaviors and data
of the application.
• This could be a database, or any number of data
structures or storage systems. In short, it is the data and
data-management of the application.
7. VIEW
• A view generates new output to the user based on
changes in the model.
• The View component is used for all the UI logic of the
application
• The view effectively provides the user interface element
of the application. It'll render data from the model into a
form that is suitable for the user interface.
8. MVC works like CMV
• Controller
• Model
• View
Controller
Model
View