· Glossary · 2 min read
What Is the MVC Pattern?
Learn about the Model-View-Controller (MVC) pattern, a software design pattern that divides related program logic into three interconnected elements.

If you throw all your code into one file you end up with a mess. You mix the database logic with the HTML logic.
MVC is the cleanup crew.
Simple Definition
MVC stands for Model-View-Controller. It is a software design pattern that divides the related program logic into three interconnected elements.
- Model: The data. (Database tables, Business Logic).
- View: The user interface. (HTML, CSS, JSON response).
- Controller: The brain. It accepts input and converts it to commands for the Model or View.
Model-View-Controller separation
This separation means you can change the View (the design) without breaking the Model (the data). It allows Frontend and Backend developers to work on the same app without stepping on each other’s toes.
Use Case
This pattern powers the web.
Web frameworks (Spring, Django)
- Spring Boot: Uses
@Controllerto handle requests and@Entityfor Models. - Django: Calls it MVT (Model-View-Template) but the concept is identical.
- Ruby on Rails: Strictly enforces MVC folder structures.
Visualizing MVC
Visualizing this helps new developers understand where to put their code.
Three interacting components
In a Data Flow Diagram you draw three clusters.
- The User interacts with the View.
- The View sends alerts to the Controller.
- The Controller updates the Model.
- The Model notifies the View of changes.
Seeing this triangle of data flow clarifies the responsibility of each layer.
Related Terms
To understand web architecture you need these terms:
- Separation of Concerns: The principle of breaking a program into distinct sections.
- Business Logic: The core rules of the application usually contained in the Model or a separate Service layer.
- Frontend vs Backend: MVC often straddles this line with the View being the Frontend and the Model/Controller being the Backend.
For more on visualizing application layers check out our System Design Guide.




