World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0021273092
Reproduction Date:

Title: Model-view-controller  
Author: World Heritage Encyclopedia
Language: English
Subject: List of computer scientists, View, GNUstep, Cross-platform, Command pattern, Observer pattern, Compiere, Separation of concerns, Swing (Java), WebObjects
Publisher: World Heritage Encyclopedia


Model–view–controller (MVC) is a software architecture pattern which separates the representation of information from the user's interaction with it.[1][2] The model consists of application data, business rules, logic, and functions. A view can be any output representation of data, such as a chart or a diagram. Multiple views of the same data are possible, such as a bar chart for management and a tabular view for accountants. The controller mediates input, converting it to commands for the model or view.[3]

Component interactions

In addition to dividing the application into three kinds of components, the Model–view–controller (MVC) design defines the interactions between them.[4]
  • A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document).
  • A model notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. A passive implementation of MVC omits these notifications, because the application does not require them or the software platform does not support them.[5]
  • A view requests information from the model that it needs for generating an output representation to the user

Use in web applications

Although originally developed for personal computing, Model View Controller has been widely adopted as an architecture for World Wide Web applications in all major programming languages. Several commercial and noncommercial application frameworks have been created that enforce the pattern. These frameworks vary in their interpretations, mainly in the way that the MVC responsibilities are divided between the client and server.[6]

Early web MVC frameworks took a thin client approach that placed almost the entire model, view and controller logic on the server. In this approach, the client sends either hyperlink requests or form input to the controller and then receives a complete and updated web page (or other document) from the view; the model exists entirely on the server.[6] As client technologies have matured, frameworks such as JavaScriptMVC and Backbone have been created that allow the MVC components to execute partly on the client (see also AJAX).


MVC was one of the seminal insights of the early field of graphical user interfaces, and one of the first works to describe and implement software constructs in terms of their responsibilities.[7]

Trygve Reenskaug introduced MVC into Smalltalk-76 while visiting Xerox Parc,[8][9] in the 1970s; next, in the 1980s, Jim Althoff and others implemented a version of MVC for the Smalltalk-80 class library. Only later MVC was expressed as a general concept, in a 1988 article.[10]

This first MVC concept defined Controller as "the module that deals with input" (similarly to how the View deals with output).

The Controller, in modern applications of the 2000s, is a module, or an intermediary section of code, that mediates communication (between the Model and View) and unifies validation, using either direct calls or the Observer — to decouple the Model from the View in the active Model.[11]

Other aspects of the MVC also evolved, but as a variant of the original concept, and because "parts of classic MVC don't really make sense for rich clients these days":[12] HMVC, MVA, MVP, MVVM, and others that adapted MVC to different contexts.

See also


External links

  • .
  • Gang of Four (software).
  • An simple example.
  • Take MVC to the next level in .NET
  • Youtube: MVC (Model View Controller) - A quick explanation.
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.