Model-view-controller

Edit · View history

Overview

Model-view-controller (MVC) is a software architecture pattern used for designing and developing user interfaces. It separates an application into three interconnected components: the model (data and business logic), the view (user interface), and the controller (input handling and flow control). This separation helps manage complexity, improve code maintainability, and enable parallel development.

History

The MVC pattern was first described by Trygve Reenskaug in 1979 while working on the Smalltalk programming language at Xerox PARC. The original concept was part of the larger Smalltalk-80 system. Later, the pattern gained widespread adoption in the web application frameworks of the 2000s, such as Ruby on Rails, Django, and ASP.NET MVC.

Features

Variants

Several variations of MVC exist, including Model-view-adapter, Model-view-presenter, and Model-view-viewmodel. These adaptations address specific needs in mobile development, desktop applications, and web services.

Related patterns