CSC/ECE 517 Fall 2009/wiki1b 13 a1: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
History and Applications of the MVC Pattern | =History and Applications of the MVC Pattern= | ||
== Introduction == | == Introduction == |
Revision as of 00:53, 22 September 2009
History and Applications of the MVC Pattern
Introduction
The Model View Controller design pattern (MVC) proposes the separation of duties in a software application among three components, each with a distinct and specialized responsibility. The components are a model, a view, and a controller. The model handles the data which is used by the application and the necessary business logic, and is not concerned with the presentation layer or the navigation logic. The view specializes in the presentation of the data or part of it in a way that is accessible to the user, usually a Graphical User Interface (GUI). The controller is in charge of processing the interaction between the user and the application, usually the navigation logic [JAVA BOOK, PATTERNS BOOK]
History
The MVC pattern was first proposed by "Trygve Reenskaugh in 1979 and implemented by Jim Althoff for Smalltalk-80."[IEEE]. The first implementation of MVC took place at the Xerox PARC research lab as part of the Smalltalk-80 user interface [BURBECK]. Smalltalk-80 was a highly interactive graphical user interface which became the precursor of the Apple Lisa and later the Macintosh.
One of the first widely used applications of the MVC pattern on web applications appeared as part of the Java Server Pages (JSP) specification and is known as Model 2 [Patterns Book,J2EE Platform]. Model 2 implements MVC in Java using servlets and Java beans to implement web applications. In addition to the JSP MVC specification, the open source project Apache Struts provides an implementation of the framework necessary to write web applications in Java following the MCV design pattern [STRUTS]. The Struts framework has been in wide use since 2001 [IBM J].
Following the Java implementation came later Microsoft's MVC versions Active Server Pages platform. [Walther]. Initially MVC was proposed as one of the Microsoft Enterprise Library and recently it has become a full-fledged product, integral part of the latest version of ASP.NET and Visual Studio .NET.
Currently one of the most popular implementations of MVC can be found as part of the Rails framework for web-based development using Ruby. MVC is at the heart of Ruby on Rails and its principles determine how web applications should be structured [RubyBook].
Benefits and Applications
The main strength of the MVC pattern is that it separates the data, application, and representation logic form each other. In essence, applications are build using a separation of duties such that elements needed for an application to function are self-contained in a distinct component that specializes in one of these core functions.
The MVC pattern is particularly useful in applications where the same data may need to be represented in different ways. An example of this is a web-based catalog that offers a different interface for a desktop web browser and a more streamlined version for a browser on a mobile device.
Different Implementations
In addition to the implementations of MVC already mentioned, the following applications implement a version of MVC or a framework that is based on it.
WebObjects, a set of tools offered by Apple computer for the development of Java-based web applications.
JavaServer Faces, a J2EE standard for server-side user interfaces.
Service to Worker Pattern for J2EE applications, intended for Web-based desktop applications, i.e. applications with only one user [Sauter].
OpenMVC, open source framework used both in .NET and Java applications.
Maverick, is mainly for Java web development but there also are versions for .NET and PHP [Maverick].
Model View Presenter (MVP), not a specific technology but another patter inspired by the MVC. The MVP pattern is widely used on applications written in ASP.NET.
References
CSC 517 Fall 2009 Wiki 1b Assignment Author NewWolf