Components of MVC Framework:

  • Model- Model objects are the parts of the application that implement the logic for the application's data domain. Often, model objects retrieve and store model state in a database.
  • View- Views are the components that display the application's user interface (UI). Typically, this UI is created from the model data.
  • Controller- Controllers are the components that handle user interaction, work with the model, and ultimately select a view to render that displays UI. In an MVC application, the view only displays information; the controller handles and responds to user input and interaction.

The MVC pattern helps you create applications that separate the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements. The pattern specifies where each kind of logic should be located in the application. The UI logic belongs in the view. Input logic belongs in the controller. Business logic belongs in the model. This separation helps you manage complexity when you build an application, because it enables you to focus on one aspect of the implementation at a time.