Model View Controller MVC is a time tested method of separating the user interface of an application from its Domain Logic.
The primary goal of MVC is to isolate UI changes and prevent them from requiring changes to the Domain Logic of the application.
The primary reason for this division is that the user interface and Domain Logic have different drivers for change and different rates of change. By making this separation, you can change the UI without touching the Domain Logic and vice versa.
MVC is sometimes confused with other patterns that have the same goal of separating user interface from Domain Logic, such as Presentation Abstraction Control.
MVC divides an application into three concerns:
- Model - Encapsulates core application data and functionality Domain Logic.
- View - obtains data from the model and presents it to the user.
- Controller - receives and translates input to requests on the model or the view.
The separation into three concerns is inspired by a information processing model where the controller represents system input, the model represents processing and the view represents the output of the system.