Pages

Friday, 19 October 2012

What is MVC (Model View Controller): Defination and Advantages

Model–View–Controller (MVC) is a design pattern for user-facing software that separates the representation of information from the user's interaction with it. It has following 3 components:

Model: The Model is the part of the application that handles the logic for the application data. Often model objects retrieve data (and store data) from a database.

View: The View is the parts of the application that handles the display of the data. Most often the views are created from the model data.

Controller: The Controller is the part of the application that handles user interaction. Typically controllers read data from a view, control user input, and send input data to the
model.


Advantages of MVC

1. The MVC separation helps you manage complex applications, because you can focus
on one aspect a time.

For example, you can focus on the view without depending on the business logic. It also
makes it easier to test an application.

2. The MVC separation also simplifies group development. Different developers can
work on the view, the controller logic, and the business logic in parallel.

No comments:

Post a Comment