Model-View-Controller Architecture

Learn what MVC architecture is and why it's so popular.

One of the most used terms in web development is the model-view-controller (MVC) pattern. It’s so popular that it’s hard to find a non-MVC application framework in PHP. In this lesson, we’ll learn this pattern and why it’s so good.

What is MVC architecture?

Trygve Reenskaug invented the MVC pattern in the seventies to control UI elements for desktop applications. Later MVC migrated into web development. In the process, it changed significantly because the classic MVC pattern doesn’t work well with the request-response cycle in web applications.

This difference causes uncertainty and disputes about what is the proper MVC. And, these disputes are meaningless since the true MVC isn’t applicable to web application backends. This lesson covers the modern meaning of MVC for web applications because it’s the one everyone uses.

Model-view-controller is an architecture pattern that splits business logic into three components—Model, View, and Controller.

  • Model contains all the business logic and data.
  • View is responsible for generating user responses.
  • Controller is responsible for sticking everything together, parsing the request, forwarding it to Model, and forwarding the Model results to View.

Get hands-on with 1200+ tech skills courses.