What is MVC?MVC (Model View Controller) is a design pattern that was introduced in 1979. At that time it was called Thing Model View Editor. This pattern separates out the concerns within an application to three parts called Model, View and Controller.
In an MVC application, this is what the Model, View and Controller is meant for
Model: This holds the business logic.
View: This layer holds the markup (layout of the display). It receives data from the controller. It uses that data to generate the HTML response.
Controller: This is the code that interacts with the user. When a request comes in to an application, it first goes to the controller. The controller is the one who decides which model to use and which View to return to the user. It controls everything, hence the name controller.