Wednesday, 15 July 2015

MVC (Model View Controller) Architecture


Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications. A Model View Controller pattern is made up of the following three parts:
  • Model
    • The lowest level of the pattern which is responsible for maintaining data.It responds to the request from the view and it also responds to instructions from the controller to update itself.
  • View
    • This is responsible for displaying all or a portion of the data to the user.A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP
  • Controller
    • Software Code that controls the interactions between the Model and View.The controller is responsible for responding to user input and perform interactions on the data model objects. The controller receives the input, it validates the input and then performs the business operation that modifies the state of the data model.
MVC is popular as it isolates the application logic from the user interface layer and supports separation of concerns. Here the Controller receives all requests for the application and then works with the Model to prepare any data needed by the View.

No comments:

Post a Comment