# Model-View-Controller (MVC)

> Splits an app in three: data, screens and the code that links them.

**Field:** Software Development  
**Category:** Architecture  
**Also known as:** MVC, MVC Pattern, Model View Controller

## Think of it like

Think of it like a cafe. The kitchen has the food and the counter shows it. The waiter takes orders between them.

## Definition

Model-View-Controller, or MVC, splits an app into three parts. The model holds the data and the rules. The view shows the data to the user. The controller takes what the user does, updates the model and picks a view. The idea dates from the late 1970s and is still used by many web frameworks today.

## Example

On Emma's blog, clicking a post goes to a controller. It asks the post model for the text and hands it to the post view, which draws the page.

## Why it matters

It is the shape of many popular web frameworks. Knowing it tells you where to find each part of the code.

## Common mistake

Putting all the logic in the controllers until they are hundreds of lines long. The rules belong in the model.

## Three principles

- **Model.** Data and rules.
- **View.** What the user sees.
- **Controller.** Turns clicks into actions.

## Related terms

- [Layered Architecture](https://learn.benibix.com/term/development/layered-architecture)
- [Separation of Concerns](https://learn.benibix.com/term/development/separation-of-concerns)
- [Software Framework](https://learn.benibix.com/term/development/framework)
- [Web Routing](https://learn.benibix.com/term/development/routing)
- [Model-View-ViewModel (MVVM)](https://learn.benibix.com/term/development/mvvm)

## Told apart from

- [MVC vs MVVM](https://learn.benibix.com/compare/mvc-vs-mvvm): People think MVVM is just MVC with a new name, since both split screen code into three parts. In MVC, a controller takes the user's input and picks what the view shows. In MVVM, a view model holds the screen's state, and the view binds to it. Changes then flow both ways by themselves. The view model never touches the view, so it is easy to test.

---

Source: https://learn.benibix.com/term/development/mvc
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
