The Model-View-Controller architectural pattern (MVC) divides an
interactive application into three components.
- The model contains the core functionality and data.
- Views display information to the user.
- Controllers handle user input.
Views and controllers together comprise the user interface.
A
change-propagation mechanism ensures consistency between the user
interface and the model.
Lets take an example to understand MVC mechanism.
In a hotel
MVC followed by there employees.
- Business Service (Prepare Food)
- View (Add Toping on Food)
- Controller
Finally the process going to be...
- Take Order
- Give it to Cook
- Take Food and Give it For Toping
- Finally give it to Customer