Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M1335

Model-View-Controller

Model-View-Controller
StructureHigh supportLogic
Included
account_tree

Updated 2026-07-28

Loading revision record…

Summary

The Model-View-Controller (MVC) pattern is a software architecture pattern in software engineering that divides a software system into three basic parts: Model, View, and Controller. The MVC pattern was first proposed by Trygve Reenskaug in 1978 and was invented at Xerox PARC in the 1980s for the programming language Smalltalk.

Definition

The Model-View-Controller (MVC) pattern is a software architecture pattern in software engineering that divides a software system into three basic parts: Model, View, and Controller. The MVC pattern was first proposed by Trygve Reenskaug in 1978 and was invented at Xerox PARC in the 1980s for the programming language Smalltalk. The purpose of the MVC pattern is to achieve dynamic programming, simplify subsequent modifications and extensions, and enable reuse of parts of the program. Additionally, this pattern makes the program structure more intuitive by simplifying complexity. By separating the basic parts of the software system, it also assigns appropriate functions to each part. Professionals can group based on their expertise: Model - programmers write the functions (implement algorithms, etc.), database experts handle data management and database design (can implement specific functions).

How to use

The Model-View-Controller (MVC) pattern is a software architecture pattern in software engineering that divides a software system into three basic parts: Model, View, and Controller. The MVC pattern was first proposed by Trygve Reenskaug in 1978 and was invented at Xerox PARC in the 1980s for the programming language Smalltalk.

Mechanism

Reduce complexity through separation of concerns: The Model holds data and business rules, the View is responsible for presentation, and the Controller receives input and coordinates the other two. After decoupling, modifying the interface does not affect the logic, and modifying the logic does not require rewriting the interface; each can evolve and be tested independently.

Practice

In progress 0/4

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • In web applications, the database and calculation logic are in the Model, HTML pages are in the View, and routing and form handling are in the Controller; redesigning the page does not affect business rules. Similarly, when making a PPT: Model = core data and conclusions, View = layout and beautification, Controller = presentation logic.

Common pitfalls

  • Writing business logic into the View (e.g., calculating directly in the page); the Controller becoming too bloated into a "god class"; ignoring unidirectional data flow leading to difficult state tracking.
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

account_treeGenealogyexpand_more

RELATED MODELS