Model-view-controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the model represents the information (the data) of the application and the business rules used to manipulate the data; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages details involving the communication to the model of user actions such as keystrokes and mouse movements.
The pattern was first described in 1979 by Trygve Reenskaug, then working on Smalltalk at Xerox PARC. The original implementation is described in depth in the influential paper Applications Programming in Smalltalk-80: How to use Model-View-Controller.
After that numerous derivatives of the MVC pattern appeared. Probably one of the most known of them is the Model View Presenter pattern, which appeared in the early 90s and was designed to be an evolution of MVC. However Model-View-Controller still remains very widely used.
It is common to split an application into separate layers that run on different computers: presentation (UI), domain logic, and data access. In MVC the presentation layer is further separated into view and controller.
MVC is often seen in web applications, where the view is the actual HTML page, and the controller is the code that gathers dynamic data and generates the content within the HTML. Finally, the model is represented by the actual content, usually stored in a database or in XML nodes, and the business rules that transform that content based on user actions.
Though MVC comes in different flavors, control flow generally works as follows:
By decoupling models and views, MVC helps to reduce the complexity in architectural design, and to increase flexibility and reuse.
MVC encompasses more of the architecture of an application than is typical for a design pattern.Model
Java Swing is different from the other frameworks, in that it supports two MVC patterns:
Simple Version using just Servlets and JSPs from J2EE:Model
The simple version uses the best parts of Servlet and JSP technology: the servlet is essentially a Java class and communicates and interacts with the model but does not have to do extensive generation of xhtml output; the JSPs do not have to communicate with the model as they are provided with the information they need by the servlet - they can concentrate on creating xhtml output.
Unlike the other frameworks, Java EE defines a pattern for model objects.Model
XForms is an XML format for the specification of a data processing model for XML data and user interface(s) for the XML data, such as web forms.Model XForms stores the Model as XML in the browser.View The Views are XForms controls for screen elements and can be placed directly in a web page.
The model and views are bound together using reference or binding statements. These binding statements are used by the XForms dependancy graph to ensure that the correct views are updated when data in the model changes.Controller All mouse events are processed by XForms controls and XML events are dispatched.
Smalltalk's MVC implementation inspired many other GUI frameworks, such as the following:
MVC is typically implemented as a "Model 2" architecture in Sun parlance. Model2 focuses on efficiently handling and dispatching full page form posts and reconstructing the full page via a front controller. Complex web applications continue to be more difficult to design than traditional applications because of this "full page" effect. More recently AJAX driven frameworks that focus on firing focused UI events at specific UI Components on the page are emerging. This is causing MVC to be revisited for web application development using traditional desktop programming techniques.
General information regarding MVC
CLEVELAND STATE ART GALLERY PRESENTS WORKS BY 31 OHIO SCULPTORS WITH INTO VIEW: CELEBRATING 15 YEARS OF 'WINDOW TO SCULPTURE,' MAY 19 - JUNE 16
Apr 24, 2006; Celeveland State University issued the following news release: The Cleveland State University Art Gallery will present INTO VIEW:...
Beach Energy Limited (ASX:BPT) Gas Strategy Comes Into View Quarterly Sales And Revenue Up 7%, Production 1.9 MMboe
Jan 21, 2010; Beach Energy Limited's (ASX:BPT) (PINK:BEPTF) international oil diversification and first-mover initiatives with its Cooper Basin...