MVC

Model - View - Controller

The Model-View-Controller (MVC) framework is an architectural pattern that separates an application into three main logical components Model, View, and Controller.

What is MVC Paradigm?

Each architecture component is built to handle specific development aspect of an application. MVC separates the business logic and presentation layer from each other.

What is MVC Framework?

The model component stores data and its related logic. It represents data that is being transferred between controller components or any other related business logic.

Model

  • A View is that part of the application that represents the presentation of data.

  • Views are created by the data collected from the model data.

  • The view also represents the data from chats, diagrams, and table.

  • We will learn EJS and later ReactJS

View

Handles the business logic of the application and sends commands to the model.

User cannot contact the model.

Controller

Benefits

  • Easy code maintenance easy to extend and grow
  • It helps you to avoid complexity by dividing an application into the three units. Model, view, and controller
  • Provides clean separation of concerns

  • Search Engine Optimization (SEO) Friendly

  • Allows logical grouping of related actions on a controller together

Other Paradigms

All are triads with a different approach to a similar concept to separate concerns

Let's code our controllers

MVC

By JD Richards