CSC/ECE 517 Fall 2009/wiki1b 13 a1
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 [10, 15]
History
The MVC pattern was first proposed by "Trygve Reenskaugh in 1979 and implemented by Jim Althoff for Smalltalk-80[8]." The first implementation of MVC took place at the Xerox PARC research lab as part of the Smalltalk-80 user interface [7]. 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 [2, 10]. 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 [18].
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 [14].
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 [18].
- 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.
- 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
[1] Apache Struts Web Application Framework. 2009, http://struts.apache.org/.
[2] Designing Enterprise Applications with the J2EE Platform, Second Edition. 2009, http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html.
[3] ASP.NET MVC : The Official Microsoft ASP.NET Site. 2009, http://www.asp.net/mvc/.
[4] JavaServer Faces Technology. 2009, http://java.sun.com/javaee/javaserverfaces/.
[5] Developer - WebObjects. 2009, http://developer.apple.com/WebObjects/.
[6] BARRETT, R. AND DELANY, S.J. 2004. OpenMVC: a non-proprietry component-based framework for web applications. In WWW Alt. '04: Proceedings of the 13th international World Wide Web conference on Alternate track papers \& posters, New York, NY, USA, ACM, New York, NY, USA, 464-465.
[7] BURBECK, S. 1997. Applications Programming in Smalltalk-80(TM): How to use Model-View-Controller (MVC). 2009, http://st-www.cs.illinois.edu/users/smarch/st-docs/mvc.html.
[8] CURRY, E. AND GRACE, P. 2008. Flexible Self-Management Using the Model-View-Controller Pattern. IEEE Software 25, 84-90. http://search.ebscohost.com/login.aspx?direct=true&db=aph&AN=32187572&site=ehost-live&scope=site.
[9] FOWLER, M. 2006. GUI Architectures. http://www.martinfowler.com/eaaDev/uiArchs.html.
[10] FREEMAN, E., FREEMAN, E., SIERRA, K. AND BATES, B. 2004. Head First Design Patterns. O'Reilly Media, Inc., .
[11] GAMMA, E. 1995. Design patterns: elements of reusable object-oriented software Addison-Wesley, Reading, Mass.
[12] HANSEN, S. AND FOSSUM, T.V. 2005. Refactoring model-view-controller. J.Comput.Small Coll. 21, 120-129. .
[13] KRASNER, G.E. AND POPE, S.T. 1998. A Description of the Model-View-Controller User Interface Paradigm in the Small-talk-80 System. 1, 26-49. .
[14] SAM RUBY, THOMAS, D. AND DAVID HEINEMEIER HANSSON. Agile Web Development with Rails Pragmatic Bookshelf, .
[15] SKRIEN, D.J. 2009. The Model-View-Controller Architecture. In Object-Oriented Design Using Java, McGraw-Hill Higher Education, , 234.
[16] WALTHER, S. ASP.NET MVC Framework Unleashed. Sams, .
[17] WALTHER, S. 2008. The Evolution of MVC. .
[18] YAN, N., LEIP, D. AND GUPTA, K. 2005. The use of open-source software in the IBM corporate portal. IBM Systems Journal 44, 419-425.
CSC 517 Fall 2009
Wiki 1b Assignment
Author Newwolf