Successful use of MVC isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other.
Model: represents the information (the data) of the application and the business rules used to manipulate the data.
View: corresponds to the rendering of the user interface such as text, checkbox items, and so forth.
Controller: manage details involving the communication to the model of user actions such as keystrokes and mouse movements.
It is common to split an application into separate layers that run on different computers: presentation (UI), domain logic, and data access. In MVC, the presentation layer is further separated into view and controller.
MVC is often seen in web applications, where the view is the actual HTML page, and the controller is the code that gathers dynamic data and generates the content within the HTML. Finally, the model is represented by actual content, usually stored in a database or XML nodes, and the business rules that transform that content based on user actions.
Typical flow:
- The user interacts with the UI in some way (click, press a button).
- A controller handles the input event from the user interface, often via a registered handler or callback
- The controller notifies the model of the user action, possibly resulting in a change in the model's state (controller updates user's shopping cart).
- A view uses the model (indirectly) to generate an appropriate user interface. The view gets its data from the model. The model has no direct knowledge of the view.
- The user interface waits for further user interactions, which begins a new cycle.





