The MVC pattern
The MVC pattern is another application of the loose coupling principle. The name of the pattern comes from the three main components used to split a software application: the model, the view, and the controller.
Even if we will never have to implement it from scratch, we need to be familiar with it because all common frameworks use MVC or a slightly different version of it (more on this later).
The model is the core component. It represents knowledge. It contains and manages the (business) logic, data, state, and rules of an application. The view is a visual representation of the model. Examples of views are a computer GUI, the text output of a computer terminal, a smartphone’s application GUI, a PDF document, a pie chart, a bar chart, and so forth. The view only displays the data; it doesn’t handle it. The controller is the link/glue between the model and the view. All communication between the model and the view happens through a controller.
...