What is MVC?
MVC (Model-View-Controller) is an application structure building technology where functions are divided between the components of a given structure for performing various operations. These components are the model, view and controller:
- The model serves to provide data to the controller at the request of the user.
- The controller is responsible for handling user requests. He calls the appropriate model for the task and selects the appropriate view, and can also call other controllers.
- The view is responsible for displaying data obtained from the model.
The main purpose of using MVC is to separate the business logic of the application from the user interface. Due to this separation, each component can be modified independently.