CSC/ECE 517 Fall 2007/wiki2 3 bp: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Model-View-Controller Review of Resources =
= Model-View-Controller Review of Resources =
Written by Ben Parees
Written by Ben Parees
'''Assignment:'''<br>
''Model/view/controller. There are literally hundreds of pages describing MVC on the Web. If someone wants to learn about it, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the MVC sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which are best for explaining how to use the pattern in Ruby and Java? If you choose this topic, you should be sure to peruse at least several dozen sites.''
<br>
<br>
'''Notes to reviewers (please read):'''<br>
:<li>If you are going to evaluate this page as less than 5/5 for something, please include a comment about '''why''' you did not give full marks.  Saying "yes" and then giving me 4/5 is confusing and doesn't tell me how to fix the problem.</li>
:<li>The assignment is not only to group the pages into categories like "explanations", "examples", and "tutorials" (which I thik I did), but also to '''review''' the web sites, this is why I reviewed the sites on quality of writing and discussed what exactly the site covers and how well it covers it.</li>
:<li>To the person who requested I "group" stuff, it is grouped quite a bit as is, there are no less than 8 different sections for grouping the different types of information.  However I have introduced additional highlighting of the "best of the best" since I understand there are still a large number of links in each grouping.</li>
<br>
Thank you for taking these comments into consideration during your final evaluation.


== Overview of the Model View Controller Pattern ==
== Overview of the Model View Controller Pattern ==
Line 11: Line 24:
   
   
The rest of this page provides links to websites which provide more in depth information describing MVC, examples of its usage, and specific tutorials for using MVC in Java and Ruby, along with reviews of those sites.
The rest of this page provides links to websites which provide more in depth information describing MVC, examples of its usage, and specific tutorials for using MVC in Java and Ruby, along with reviews of those sites.
Note that while there are a large number of sites listed here, many of them serve different purposes (overviews vs. tutorials, for example) and within those broad categories, different sites offer a different level of detail or focus.  The reader should therefore peruse the reviews and evaluations of the sites in order to find a site which tackles the material at a level they are interested in.  Although the number of sites referenced could be significantly reduced and still cover the general concepts of MVC, this approach offers the reader the ability to select sites which match their needs.  In order to aid the user, I have placed what I consider the "best" site for each category first within that cateory and in '''bold'''.




Line 26: Line 43:
These sites offer a quick overview of the key concepts of MVC and can be read in 10-15 minutes by a typical user.
These sites offer a quick overview of the key concepts of MVC and can be read in 10-15 minutes by a typical user.
<hr>
<hr>
http://best-practice-software-engineering.ifs.tuwien.ac.at/patterns/mvc.html<br>
'''This page provides the best diagram of MVC in operation of any page I found.  The diagram at the top of this page provides a perfect representation of the interaction and invocation of each component in an MVC application, including the role of the user.  In addition, the actual definitions of the MVC components are very appropriate for an introductory lesson on MVC.'''
Level of Detail: low<br>
Quality of Writing: high<br>
Length of content: Short<br>
<br>
<hr>
http://struts.javabeat.net/tutorials/<br>
http://struts.javabeat.net/tutorials/<br>
This website provides a very short overview of MVC by defining model, view, and controller.  It is a somewhat Struts centric, providing examples of how Struts components fulfill each of the MVC roles, however the definitions are general to MVC as a whole.  The bottom of the page contains a useful diagram of the MVC components.  Although this diagram is labeled in terms of Struts components, it is easily comprehended even by a user who is not implementing the MVC pattern using Struts.  (See the Implementing MVC in Java section for web pages which discuss Struts in depth).
This website provides a very short overview of MVC by defining model, view, and controller.  It is a somewhat Struts centric, providing examples of how Struts components fulfill each of the MVC roles, however the definitions are general to MVC as a whole.  The bottom of the page contains a useful diagram of the MVC components.  Although this diagram is labeled in terms of Struts components, it is easily comprehended even by a user who is not implementing the MVC pattern using Struts.  (See the Implementing MVC in Java section for web pages which discuss Struts in depth).
Line 71: Line 97:
Level of Detail: Low<br>
Level of Detail: Low<br>
Quality of Writing: Medium<br>
Quality of Writing: Medium<br>
Length of content: Short<br>
<br>
<hr>
http://best-practice-software-engineering.ifs.tuwien.ac.at/patterns/mvc.html<br>
Though not notable for its definition of MVC itself, this page provides the best diagram of MVC in operation of any page I found.  The diagram at the top of this page provides a perfect representation of the interaction and invocation of each component in an MVC application, including the role of the user.  Once the reader has familiarized themselves with the definition and intent of MVC via some of the other pages, the diagram here will provide an excellent visualization of how the pieces fit together in an application.  However, this page should not be used as a starting point to develop an understanding of MVC.
Level of Detail: low<br>
Quality of Writing: high<br>
Length of content: Short<br>
Length of content: Short<br>
<br>
<br>
Line 93: Line 111:
<hr>
<hr>
http://www.mercurytide.co.uk/whitepapers/separating-structure-presentation-and-behaviour/<br>
http://www.mercurytide.co.uk/whitepapers/separating-structure-presentation-and-behaviour/<br>
Starting approximately 1/3 of the way down the page, this website gives the classic definitions of model, view, and controller.  In addition, it provides a short discussion on the advantages of the MVC approach.  Finally, it provides a short example of how to separate a web page into the view (done in xhtml) and the controller (done in javascript).  This example is not fully fleshed out and thus not paticularly useful as a starting point for someone implementing MVC on their own, but it provides a good demonstration of what sort of things belong in the controller and which belong in the view.  This lends a certain concreteness to the concepts described in the MVC definition section of the page.
'''Starting approximately 1/3 of the way down the page, this website gives the classic definitions of model, view, and controller.  In addition, it provides a short discussion on the advantages of the MVC approach.  Finally, it provides a short example of how to separate a web page into the view (done in xhtml) and the controller (done in javascript).  This example is not fully fleshed out and thus not paticularly useful as a starting point for someone implementing MVC on their own, but it provides a good demonstration of what sort of things belong in the controller and which belong in the view.  This lends a certain concreteness to the concepts described in the MVC definition section of the page.'''


Level of Detail: Medium <br>
Level of Detail: Medium <br>
Line 125: Line 143:
=== In Depth Overviews ===
=== In Depth Overviews ===
These sites provide the deepest background on the origins of MVC, advantages and disadvantages, and discussions of the MVC interaction flow.
These sites provide the deepest background on the origins of MVC, advantages and disadvantages, and discussions of the MVC interaction flow.
<hr>
http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf<br>
'''Actually a chapter from a book which is available online, the first half of this pdf file provides the most in depth discussion of what MVC is of all of the sites reviewed on this page.  Professionally written, this very detailed overview includes flow diagrams of what happens when a user interacts with an MVC application, how responsibility is delegated to each aspect of the MVC framework, and motivates it all with a real world example of a Clock application.  If one wants to truly understand the structure of the MVC pattern, including UML diagrams of the component pieces, this is the page to view.'''


Level of Detail: High<br>
Quality of Writing: High<br>
Length of content: Long<br>
<br>
<hr>
http://en.wikipedia.org/wiki/Model-view-controller<br>
http://en.wikipedia.org/wiki/Model-view-controller<br>
The canonical source for MVC definition, the Wikipedia page provides not only a good overview of the MVC concepts, but also some history about the origins of MVC.  It also provides a discussion of how MVC is implemented in various programming languages including a discussion of both traditional GUI frameworks and the more modern web-based frameworks.  While this information is not detailed enough to guide a user to implement an MVC style application in any of these languages, it provides some good fundamental information about how each of the MVC pieces are represented by library components in various languages including Java and .NET.  This site also provides a fairly complete list of known MVC framework implementations which users might wish to leverage when implementing their own MVC based application, though no information is provided about how to use these frameworks or what the pros and cons of each might be.
The canonical source for MVC definition, the Wikipedia page provides not only a good overview of the MVC concepts, but also some history about the origins of MVC.  It also provides a discussion of how MVC is implemented in various programming languages including a discussion of both traditional GUI frameworks and the more modern web-based frameworks.  While this information is not detailed enough to guide a user to implement an MVC style application in any of these languages, it provides some good fundamental information about how each of the MVC pieces are represented by library components in various languages including Java and .NET.  This site also provides a fairly complete list of known MVC framework implementations which users might wish to leverage when implementing their own MVC based application, though no information is provided about how to use these frameworks or what the pros and cons of each might be.
Line 148: Line 174:
Quality of Writing: High<br>
Quality of Writing: High<br>
Length of content: Medium<br>
Length of content: Medium<br>
<br>
<hr>
http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf<br>
Actually a chapter from a book which is available online, the first half of this pdf file provides the most in depth discussion of what MVC is of all of the sites reviewed on this page.  Professionally written, this very detailed overview includes flow diagrams of what happens when a user interacts with an MVC application, how responsibility is delegated to each aspect of the MVC framework, and motivates it all with a real world example of a Clock application.  If one wants to truly understand the structure of the MVC pattern, including UML diagrams of the component pieces, this is the page to view.
Level of Detail: High<br>
Quality of Writing: High<br>
Length of content: Long<br>
<br>
<br>


Line 168: Line 186:
=== Simple Examples ===
=== Simple Examples ===


http://www.slideshare.net/codeinmotion/mvc-demystified-essence-of-ruby-on-rails<br>
'''Starting on slide 16, this presentation on MVC uses the real world example of a bakery to demonstrate how the MVC components can be applied.  Of the examples cited on this page, tihs one is the most accessible due to its reliance on purely real world concepts rather than any actual code or implementation details.  The example provides a very natural way to think about MVC and encourages the reader to see that anything can be defined in terms of Models, Views, and Controllers.'''
Complexity of example: Low<br>
Quality of Writing: High<br>
<br>
<hr>
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/chapter02/chapter_2_section_3.html<br>
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/chapter02/chapter_2_section_3.html<br>
This site provides some of the cleanest MVC diagrams of all the sites reviewed.  In addition to having a solid discussion of the MVC terminology, it provides a concrete example of a currency converter application with a discussion of how each piece of this application maps to each of the MVC components.  Again diagrams of the components are provided along with very easy to read descriptions of the components.  
This site provides some of the cleanest MVC diagrams of all the sites reviewed.  In addition to having a solid discussion of the MVC terminology, it provides a concrete example of a currency converter application with a discussion of how each piece of this application maps to each of the MVC components.  Again diagrams of the components are provided along with very easy to read descriptions of the components.  
Line 210: Line 235:
<br>
<br>
<hr>
<hr>
http://www.slideshare.net/codeinmotion/mvc-demystified-essence-of-ruby-on-rails<br>
=== Detailed Examples ===
Starting on slide 16, this presentation on MVC uses the real world example of a bakery to demonstrate how the MVC components can be appliedOf the examples cited on this page, tihs one is the most accessible due to its reliance on purely real world concepts rather than any actual code or implementation details.  The example provides a very natural way to think about MVC and encourages the reader to see that anything can be defined in terms of Models, Views, and Controllers.
http://www.csis.pace.edu/~bergin/mvc/mvcgui.html<br>
'''Another non-web based example of using MVC, this page applies MVC to a thermostat controlling GUIThe example is well developed, with the author adding incremental complexity in order to show the true power of MVC in terms of making it easy to extend and enhance an application without breaking existing functionality or changing existing pieces of the application.  The example is implemented (with source code provided) in Java, which is particularly beneficial as the majority of readers are likely to be able to easily follow and perhaps even compile and run the sample application.'''


Complexity of example: Low<br>
Complexity of example: Medium<br>
Quality of Writing: High<br>
Quality of Writing: High<br>
<br>
<br>
<hr>
<hr>
=== Detailed Examples ===
http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf<br>
http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf<br>
Though already linked above in the list of sites which provide quality overviews of MVC, this page is also worthy of note for its excellent example application.  Although the implementation is done in ActionScript, the exercise of defining how a Clock application can be implemented in MVC to easily provide different ways of viewing and managing the current time while separating the code into easily modified independent components is general enough that it is worth reading.  Even if the reader has no experience or interest in ActionScript, the code can be interpreted as pseudocode and the reader will still find the information worthwhile in terms of demonstrating how to break a problem down into traditional MVC components.
Though already linked above in the list of sites which provide quality overviews of MVC, this page is also worthy of note for its excellent example application.  Although the implementation is done in ActionScript, the exercise of defining how a Clock application can be implemented in MVC to easily provide different ways of viewing and managing the current time while separating the code into easily modified independent components is general enough that it is worth reading.  Even if the reader has no experience or interest in ActionScript, the code can be interpreted as pseudocode and the reader will still find the information worthwhile in terms of demonstrating how to break a problem down into traditional MVC components.
Line 229: Line 254:


Complexity of example: High<br>
Complexity of example: High<br>
Quality of Writing: High<br>
<br>
<hr>
http://www.csis.pace.edu/~bergin/mvc/mvcgui.html<br>
Another non-web based example of using MVC, this page applies MVC to a thermostat controlling GUI.  The example is well developed, with the author adding incremental complexity in order to show the true power of MVC in terms of making it easy to extend and enhance an application without breaking existing functionality or changing existing pieces of the application.  The example is implemented (with source code provided) in Java, which is particularly beneficial as the majority of readers are likely to be able to easily follow and perhaps even compile and run the sample application.
Complexity of example: Medium<br>
Quality of Writing: High<br>
Quality of Writing: High<br>
<br>
<br>
Line 250: Line 268:
<hr>
<hr>
http://www.onlamp.com/pub/a/onlamp/2006/12/14/revisiting-ruby-on-rails-revisited.html<br>
http://www.onlamp.com/pub/a/onlamp/2006/12/14/revisiting-ruby-on-rails-revisited.html<br>
The classic starting point for learning Ruby on Rails.  This tutorial goes through installing Ruby, Rails, and everything else needed to create a Rails project from the ground up.  At the conclusion of this article, a full MVC application has been created utilizing the Rails framework, making this site the perfect starting point for someone looking to implement MVC in Ruby.
'''The classic starting point for learning Ruby on Rails.  This tutorial goes through installing Ruby, Rails, and everything else needed to create a Rails project from the ground up.  At the conclusion of this article, a full MVC application has been created utilizing the Rails framework, making this site the perfect starting point for someone looking to implement MVC in Ruby.'''


Completeness of Tutorial: High<br>
Completeness of Tutorial: High<br>
Line 300: Line 318:
=== MVC in Java (Non-Struts) ===
=== MVC in Java (Non-Struts) ===
These sites discuss creating MVC applications in Java without using the Struts MVC framework.  Some of these tutorials provide guidance for creating web-based applications using JSP/Servlets, and others discuss how to leverage MVC in standard Java applications such as a Swing application.  Note that many of these sites provide examples which require a JSP/Servlet container but do not describe how to set one up.  As a result, many of them received low ratings on "completeness."
These sites discuss creating MVC applications in Java without using the Struts MVC framework.  Some of these tutorials provide guidance for creating web-based applications using JSP/Servlets, and others discuss how to leverage MVC in standard Java applications such as a Swing application.  Note that many of these sites provide examples which require a JSP/Servlet container but do not describe how to set one up.  As a result, many of them received low ratings on "completeness."
<hr>
http://javadude.com/articles/vaddmvc2/mvc2.html<br>
'''One of the few articles which implements a non-web-based MVC architecture in Java.  This article shows how to apply MVC concepts to a typical Java GUI application.  The article is extremely detailed, walking the user through the code with great care, ensuring that the reader should be able to apply the MVC techniques to their own Java application.'''
Completeness of Tutorial: High<br>
Completeness of Sample Application: High<br>
<br>
<hr>
<hr>
http://www.articlegold.com/Article/Simple-J2EE-Model-View-Controller-Type-II-Framework/6091<br>
http://www.articlegold.com/Article/Simple-J2EE-Model-View-Controller-Type-II-Framework/6091<br>
Line 319: Line 344:


Completeness of Tutorial: Low<br>
Completeness of Tutorial: Low<br>
Completeness of Sample Application: High<br>
<br>
<hr>
http://javadude.com/articles/vaddmvc2/mvc2.html<br>
One of the few articles which implements a non-web-based MVC architecture in Java.  This article shows how to apply MVC concepts to a typical Java GUI application.  The article is extremely detailed, walking the user through the code with great care, ensuring that the reader should be able to apply the MVC techniques to their own Java application.
Completeness of Tutorial: High<br>
Completeness of Sample Application: High<br>
Completeness of Sample Application: High<br>
<br>
<br>
Line 352: Line 370:
=== MVC in Java - Struts ===
=== MVC in Java - Struts ===
These tutorials all discuss creating MVC based Java applications by leveraging the Apache Struts MVC framework which is a powerful library for creating web-based MVC architected applications.  It is most comparable to the Rails framework in Ruby. Many of these tutorials do not provide instructions for downloading and installing/configuring the Struts package, so they received low "completeness" ratings.
These tutorials all discuss creating MVC based Java applications by leveraging the Apache Struts MVC framework which is a powerful library for creating web-based MVC architected applications.  It is most comparable to the Rails framework in Ruby. Many of these tutorials do not provide instructions for downloading and installing/configuring the Struts package, so they received low "completeness" ratings.
<hr>
http://struts.javabeat.net/tutorials/1-introduction-to-the-apache-struts.php<br>
'''A fine tutorial on the use of the Struts framework to implement an MVC application in Java, this page goes over the definition of MVC before launching into a discussion of the Struts framework.  Finally it walks the reader through implementing an extensive sample application using Struts.  Going beyond the typical hello world style application, the sample application used in this tutorial leverages some of the more complicated features of Struts including validation.'''
Completeness of Tutorial: High<br>
Completeness of Sample Application: High<br>
<br>
<hr>
<hr>
http://www.ibm.com/developerworks/web/library/j-struts/<br>
http://www.ibm.com/developerworks/web/library/j-struts/<br>
Line 372: Line 398:
Completeness of Tutorial: High<br>
Completeness of Tutorial: High<br>
Completeness of Sample Application: Low<br>
Completeness of Sample Application: Low<br>
<br>
<hr>
http://struts.javabeat.net/tutorials/1-introduction-to-the-apache-struts.php<br>
A fine tutorial on the use of the Struts framework to implement an MVC application in Java, this page goes over the definition of MVC before launching into a discussion of the Struts framework.  Finally it walks the reader through implementing an extensive sample application using Struts.  Going beyond the typical hello world style application, the sample application used in this tutorial leverages some of the more complicated features of Struts including validation.
Completeness of Tutorial: High<br>
Completeness of Sample Application: High<br>
<br>
<br>
== References ==
== References ==
All sources used to create this wiki are linked in the above text.
All sources used to create this wiki are linked in the above text.
Model/view/controller. There are literally hundreds of pages describing MVC on the Web. If someone wants to learn about it, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the MVC sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which are best for explaining how to use the pattern in Ruby and Java? If you choose this topic, you should be sure to peruse at least several dozen sites.

Latest revision as of 19:12, 28 October 2007

Model-View-Controller Review of Resources

Written by Ben Parees

Assignment:
Model/view/controller. There are literally hundreds of pages describing MVC on the Web. If someone wants to learn about it, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the MVC sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which are best for explaining how to use the pattern in Ruby and Java? If you choose this topic, you should be sure to peruse at least several dozen sites.

Notes to reviewers (please read):

  • If you are going to evaluate this page as less than 5/5 for something, please include a comment about why you did not give full marks. Saying "yes" and then giving me 4/5 is confusing and doesn't tell me how to fix the problem.
  • The assignment is not only to group the pages into categories like "explanations", "examples", and "tutorials" (which I thik I did), but also to review the web sites, this is why I reviewed the sites on quality of writing and discussed what exactly the site covers and how well it covers it.
  • To the person who requested I "group" stuff, it is grouped quite a bit as is, there are no less than 8 different sections for grouping the different types of information. However I have introduced additional highlighting of the "best of the best" since I understand there are still a large number of links in each grouping.

  • Thank you for taking these comments into consideration during your final evaluation.


    Overview of the Model View Controller Pattern

    The Model-View-Controller pattern, referred to as MVC in most literature, is a way of structuring code to achieve separation of concerns. In this case, the three concerns are managing the physical data, representing the data to the user, and tying the representation of the data to the physical data in such a way that it can be manipulated by the user. These three concerns are managed by:

  • the model, which handles the physical data storage and retrieval
  • the view, which handles the graphical display of the data to the user
  • the controller, which maps user input on the view into manipulation of the physical data in the model

  • The rest of this page provides links to websites which provide more in depth information describing MVC, examples of its usage, and specific tutorials for using MVC in Java and Ruby, along with reviews of those sites.

    Note that while there are a large number of sites listed here, many of them serve different purposes (overviews vs. tutorials, for example) and within those broad categories, different sites offer a different level of detail or focus. The reader should therefore peruse the reviews and evaluations of the sites in order to find a site which tackles the material at a level they are interested in. Although the number of sites referenced could be significantly reduced and still cover the general concepts of MVC, this approach offers the reader the ability to select sites which match their needs. In order to aid the user, I have placed what I consider the "best" site for each category first within that cateory and in bold.



    Introductory Sites

    These sites provide a description of what the Model View Controller pattern is. They should be used by someone who is not yet familiar with the concepts of Models, Views, and Controllers or what their responsibilities are. Some of these sites also discuss the pros and cons of implementing MVC and describe how the pieces interact.

    These sites are evaluated based on three criteria:

  • Level of Detail: This evaluates how much depth of information is offered in the description of MVC. The rating here does not reflect the quality of the site, but rather should be used to match the reader's desire for detail to an appropriate site.
  • Quality of Writing: This evaluates how easy the article is to understand.
  • Length of Content: This attempts to evaluate how long the average reader would take to consume the content. Short equates to 10-15 minutes, Medium is 30-60 minutes, and Long is anything beyond that. Again this is not a measure of the quality of the site, but should be used to match the reader's desire/time contraints to an appropriate site.

  • Short Overviews

    These sites offer a quick overview of the key concepts of MVC and can be read in 10-15 minutes by a typical user.


    http://best-practice-software-engineering.ifs.tuwien.ac.at/patterns/mvc.html
    This page provides the best diagram of MVC in operation of any page I found. The diagram at the top of this page provides a perfect representation of the interaction and invocation of each component in an MVC application, including the role of the user. In addition, the actual definitions of the MVC components are very appropriate for an introductory lesson on MVC.

    Level of Detail: low
    Quality of Writing: high
    Length of content: Short


    http://struts.javabeat.net/tutorials/
    This website provides a very short overview of MVC by defining model, view, and controller. It is a somewhat Struts centric, providing examples of how Struts components fulfill each of the MVC roles, however the definitions are general to MVC as a whole. The bottom of the page contains a useful diagram of the MVC components. Although this diagram is labeled in terms of Struts components, it is easily comprehended even by a user who is not implementing the MVC pattern using Struts. (See the Implementing MVC in Java section for web pages which discuss Struts in depth).

    Level of Detail: Low
    Quality of Writing: High
    Length of Content: Short


    http://hubpages.com/hub/MVC
    This site provides the standard definition of the MVC components along with a short discussion of the advantages of the MVC structure, with an emphasis on the idea of having multiple views of the model data. This site does not offer any special insight into MVC, but if one is just looking for a quick overview of what the MVC concept is, it can be found here.

    Level of Detail: Medium
    Quality of Writing: High
    Length of content: Short


    http://doc.trolltech.com/4.3/model-view-introduction.html
    Though primarily intended as a guide to using the MVC framework provided in the Qt library, the first half of this page provides the usual definition of Models, Views, and Controllers which are general enough to be of use to anyone trying to understand the basic concepts.

    Level of Detail: Low
    Quality of Writing: Medium
    Length of content: Short


    http://www.mobilefish.com/popupwindow/mvc_song.html
    Included mainly for completeness and humor value, this page sets a loose description of MVC to lyrical form, including a downloadable mp3 version of the MVC song. Though not useful as a primary source for someone just starting to learn what MVC is about, someone with a basic grasp of the MVC concepts might find a few interesting tidbits about the value and application of MVC hidden within the lyrics of this song.

    Level of Detail: Low
    Quality of Writing: High
    Length of content: Low


    http://ootips.org/mvc-pattern.html
    Another classic definition of MVC. This page does not provide a particularly outstanding definition of MVC, but it is serviceable as a basic introduction to the MVC concepts. The page does provide a valuable diagram of the Model/View/Controller interaction.

    Level of Detail: Low
    Quality of Writing: Medium
    Length of content: Short


    http://c2.com/cgi/wiki?ModelViewController
    This site provides a large collection of individual short summaries about what MVC is and is not. The value of each of these summaries varies greatly but at least a few of them provided some interesting insights into the MVC concept. This site should definitely not be used as a primary introduction to what MVC is, but once the reader has a reasonable grasp on the MVC concepts, they are likely to find a few nuggets here that lead to a deeper understanding of the true power and intent of the MVC architecture.

    Level of Detail: Low
    Quality of Writing: Medium
    Length of content: Short


    http://orderedlist.com/articles/rails-and-mvc
    Another page which purports to be discussing Ruby on Rails, but really only discusses MVC in very general terms. Still, when taken as such, this page provides a nice quick summary of Models, Views, and Controllers. In addition it provides a few guidelines about what sort of content should be in each component and how to tell if you are trying to do unnatural things in one of your components. Overall this site provides high quality definitions of MVC, and the generalized implementation guidelines are a nice touch for someone who is trying to understand in more concrete terms how to structure their MVC application.

    Level of Detail: Low
    Quality of Writing: High
    Length of content: Short

    Intermediate Overviews

    These sites go beyond the standard glossary definitions and offer a deeper understanding of what MVC is all about.


    http://www.mercurytide.co.uk/whitepapers/separating-structure-presentation-and-behaviour/
    Starting approximately 1/3 of the way down the page, this website gives the classic definitions of model, view, and controller. In addition, it provides a short discussion on the advantages of the MVC approach. Finally, it provides a short example of how to separate a web page into the view (done in xhtml) and the controller (done in javascript). This example is not fully fleshed out and thus not paticularly useful as a starting point for someone implementing MVC on their own, but it provides a good demonstration of what sort of things belong in the controller and which belong in the view. This lends a certain concreteness to the concepts described in the MVC definition section of the page.

    Level of Detail: Medium
    Quality of Writing: Medium
    Length of content: Medium


    http://www.indiawebdevelopers.com/technology/java/mvcarchitecture.asp
    This page offers a solid definition of MVC, within the context of software design patterns in general. This is particularly elegant since it discusses not only the advantages of MVC itself, but the advantages of using any design pattern. The definition itself is particularly thorough, describing some of the actual mechanics involved in performing the Model, View, and Controller tasks. Finally it concludes with a short discussion on the advantages of the MVC approach which is lacking in some of the other literature on MVC.

    Level of Detail: Medium
    Quality of Writing: Medium
    Length of content: Medium


    http://www.themolehill.com/index.php/2006/07/29/beginners-guide-model-view-controller-mvc-architecture/
    Nestled in the middle of a tutorial about Ruby on Rails, this article diverges into a typical discussion of what MVC is all about. The definitions in this page are resoundingly average, providing a perfectly adequate overview of what each component is and how they interact but without providing any sort of example to cement the concepts for the user. Worth reading for a quick, easy to understand discussion of what MVC is, but this page should only be used to provide a general background understanding before moving on to deeper discussions of the inner workings of MVC. Worthy of note are the "bottom line" comments by the author which sum up each of the MVC components in a single line which describes what that component does.

    Level of Detail: Medium
    Quality of Writing: High
    Length of content: Medium


    http://slash7.com/articles/2005/2/22/mvc-the-most-vexing-conundrum
    The most informal overview of MVC (other than the MVC song, perhaps), this page discusses all the components of MVC in a very thorough, if lighthearted, manner. Whether this page should be used as a starting point for understanding MVC largely depends on the attitude of the reader. Someone looking for a no nonsense nuts and bolts overview of MVC will probably be put off by the style of this page. However, someone looking for something more than the standard dry definitions of MVC might find tihs page a bit easier to consume. The content itself is impeccable, regardless of the reader's preferences regarding writing style. This site also ties the MVC discussion back to Ruby on Rails, but the discussion of Rails is so minimal as to not be very useful to someone coming up to speed on that topic. As such, this page should only be used as an introduction to MVC and not as an introduction to MVC on Ruby/Rails.

    Level of Detail: Medium
    Quality of Writing: Medium
    Length of content: Medium

    In Depth Overviews

    These sites provide the deepest background on the origins of MVC, advantages and disadvantages, and discussions of the MVC interaction flow.


    http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf
    Actually a chapter from a book which is available online, the first half of this pdf file provides the most in depth discussion of what MVC is of all of the sites reviewed on this page. Professionally written, this very detailed overview includes flow diagrams of what happens when a user interacts with an MVC application, how responsibility is delegated to each aspect of the MVC framework, and motivates it all with a real world example of a Clock application. If one wants to truly understand the structure of the MVC pattern, including UML diagrams of the component pieces, this is the page to view.

    Level of Detail: High
    Quality of Writing: High
    Length of content: Long


    http://en.wikipedia.org/wiki/Model-view-controller
    The canonical source for MVC definition, the Wikipedia page provides not only a good overview of the MVC concepts, but also some history about the origins of MVC. It also provides a discussion of how MVC is implemented in various programming languages including a discussion of both traditional GUI frameworks and the more modern web-based frameworks. While this information is not detailed enough to guide a user to implement an MVC style application in any of these languages, it provides some good fundamental information about how each of the MVC pieces are represented by library components in various languages including Java and .NET. This site also provides a fairly complete list of known MVC framework implementations which users might wish to leverage when implementing their own MVC based application, though no information is provided about how to use these frameworks or what the pros and cons of each might be.

    Level of Detail: High
    Quality of Writing: High
    Length of content: Medium


    http://www.perlmonks.org/?node_id=402070
    Though located on a perl specific website, this article itself largely avoids specific references to Perl, making the content suitable for anyone seeking an introduction to the MVC pattern. The article provides a very high level discussion of the MVC components. Unfortunately it does not provide any sort of concrete example of how to apply MVC to solve a real world problem. It does include an interesting diagram showing the communication flow between a browser session and an MVC framework which is useful to the novice to understand what goes on in a web based MVC application. Lastly, this site includes not only a discussion of the advantages of MVC, but a list of the limitations and pitfalls of MVC. This is perhaps what makes this article stand out from the others, as no other site reviewed included any acknowledgment of potential issues with implementing an MVC solution.

    Level of Detail: High
    Quality of Writing: High
    Length of content: Medium


    http://msdn2.microsoft.com/en-us/library/ms978748.aspx
    This site is notable because of the way in which it sets up the discussion of MVC. Rather than immediately launching into a definition of the MVC components, it starts out with the problem to be solved and a discussion of why traditional solutions result in difficulties maintaining code, or in applications that perform poorly. This sets up the motivation for the MVC concept. It then goes on to introduce the MVC pattern as a solution to these problems and includes a very in depth discussion of the MVC philosophy and how it addresses the concerns raised earlier. It also includes some interesting variants on the traditional MVC interaction.

    Level of Detail: High
    Quality of Writing: High
    Length of content: Medium

    Examples of How and When to Employ MVC

    This set of web sites provide good demonstrations of how to map a real world problem into an MVC solution. These are not sites which provide good example code to someone looking to implement an MVC solution in a particular language. Instead, they are sites that provide good examples of how to break a real world scenario into the Model, View, and Controller components and what tasks should be delegated to each component.

    These sites are measured according to two qualities:

  • Complexity of example: Is the example trivial or fairly detailed? There is no "right" answer here since simple examples allow for quick understanding and complex examples allow for deeper understanding. Therefore, the purpose of this measurement is not to rate the quality of the site, but rather to allow the reader to select a site which will match the level of detail they are seeking.
  • Quality of Writing: Is the author's writing easy to follow?

  • Simple Examples

    http://www.slideshare.net/codeinmotion/mvc-demystified-essence-of-ruby-on-rails
    Starting on slide 16, this presentation on MVC uses the real world example of a bakery to demonstrate how the MVC components can be applied. Of the examples cited on this page, tihs one is the most accessible due to its reliance on purely real world concepts rather than any actual code or implementation details. The example provides a very natural way to think about MVC and encourages the reader to see that anything can be defined in terms of Models, Views, and Controllers.

    Complexity of example: Low
    Quality of Writing: High


    http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/chapter02/chapter_2_section_3.html
    This site provides some of the cleanest MVC diagrams of all the sites reviewed. In addition to having a solid discussion of the MVC terminology, it provides a concrete example of a currency converter application with a discussion of how each piece of this application maps to each of the MVC components. Again diagrams of the components are provided along with very easy to read descriptions of the components.

    Complexity of example: Low
    Quality of Writing: High


    http://www.practicalecommerce.com/blogs/developers-diary/archives/92
    Though this article appears to be intended to describe what MVC is, it falls short of that goal by launching too soon into a discussion of how to apply MVC to a simple application. That leaves this page best used as a secondary source after the reader has become familiar with the MVC components. However, once the reader has that background, this site provides an excellent discussion of how to breakdown a common problem (an application backed by database storage) into Model, View, and Controller components.

    Complexity of example: Low
    Quality of Writing: Medium


    http://java.sun.com/blueprints/patterns/MVC-detailed.html
    Though this site stops short of fully resolving a real world problem into MVC components, it provides a solid example of how the View component can be used to provide a rich variety of application interfaces. A very readable diagram provides a demonstration of how multiple views can be used to provide the same content to a variety of users regardless of what their interface to the system is.

    Complexity of example: Low
    Quality of Writing: Medium


    http://www.codersource.net/aspnet_model_view_controller_sample.html
    This page provides a nuts and bolts example of implementing an application using MVC. Although the language used is ASP.NET, the structure of the code is universally applicable. One particularly valuable detail in this page is that the author first develops the sample application without using MVC, and then rewrites the application to leverage the MVC separation of concerns. This provides a powerful demonstration not only of how to break a problem down into its MVC components, but also what value is derived from doing so.

    Complexity of example: Low
    Quality of Writing: Medium


    http://www.enode.com/x/markup/tutorial/mvc.html
    The example presented on this page is of particular note because rather than focusing on applying MVC at a macro level to large application implementation, the author instead focuses on a single GUI widget. This demonstrates to the reader that MVC is not just a pattern to be applied to the application structure as a whole, but is also a concept which should be applied to any piece of data which is maintained by the system but interacted with by the user. The example is nicely complemented by quality illustrations to allow for easy comprehension of the concepts being discussed.

    Complexity of example: Low
    Quality of Writing: High


    http://www.developer.com/java/ent/article.php/3336761
    This page is of particular value because it describes how MVC is applied to a set of libraries which have probably been used by most readers without them even realizing they were leveraging MVC. The article discusses how the Java Swing GUI framework is implemented using MVC concepts. This provides readers with a way to associate the MVC way of thinking with code they may have already written, allowing for a natural bridge from concepts they were already familiar with using, into creating their own MVC architectures for new applications.

    Complexity of example: Low
    Quality of Writing: Medium


    Detailed Examples

    http://www.csis.pace.edu/~bergin/mvc/mvcgui.html
    Another non-web based example of using MVC, this page applies MVC to a thermostat controlling GUI. The example is well developed, with the author adding incremental complexity in order to show the true power of MVC in terms of making it easy to extend and enhance an application without breaking existing functionality or changing existing pieces of the application. The example is implemented (with source code provided) in Java, which is particularly beneficial as the majority of readers are likely to be able to easily follow and perhaps even compile and run the sample application.

    Complexity of example: Medium
    Quality of Writing: High


    http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf
    Though already linked above in the list of sites which provide quality overviews of MVC, this page is also worthy of note for its excellent example application. Although the implementation is done in ActionScript, the exercise of defining how a Clock application can be implemented in MVC to easily provide different ways of viewing and managing the current time while separating the code into easily modified independent components is general enough that it is worth reading. Even if the reader has no experience or interest in ActionScript, the code can be interpreted as pseudocode and the reader will still find the information worthwhile in terms of demonstrating how to break a problem down into traditional MVC components.

    Complexity of example: Medium
    Quality of Writing: High


    http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/app-arch/app-arch5.html
    This page breaks down a "Pet Store" application into various logical components and labels each of them as Models, Views, or Controllers. This is a solid example of how to apply the MVC structure to a real world concept and should really help users see how to break their own problem down into constituent MVC components.

    Complexity of example: High
    Quality of Writing: High

    How to Build an MVC Application

    These sites guide a user through the process of creating a new MVC based application in various programming languages and using various MVC frameworks. These sites are measured by two qualities:

  • Completeness of Tutorial: Does the tutorial provide all the instruction the user needs to make everything work or does it leave out crucial steps?
  • Completeness of Sample Application: Is the final application functional and useful as a sample or is it only code snippets?

  • MVC in Ruby

    These sites discuss creating MVC applications in Ruby. In the case of Ruby, this nearly universally means using the Rails MVC framework, so all of these sites amount to tutorials on writing Ruby on Rails applications.


    http://www.onlamp.com/pub/a/onlamp/2006/12/14/revisiting-ruby-on-rails-revisited.html
    The classic starting point for learning Ruby on Rails. This tutorial goes through installing Ruby, Rails, and everything else needed to create a Rails project from the ground up. At the conclusion of this article, a full MVC application has been created utilizing the Rails framework, making this site the perfect starting point for someone looking to implement MVC in Ruby.

    Completeness of Tutorial: High
    Completeness of Sample Application: High


    http://www.devarticles.com/c/a/Ruby-on-Rails/Getting-Started-with-Ruby-on-Rails/2/
    Another good site for creating a Rails application, this page goes through creating the component pieces (Model, View, Controller) of a trivial MVC application. This article is a fine starting point for someone looking to become familiar with how to write an MVC application using the Ruby on Rails framework.

    Completeness of Tutorial: Low
    Completeness of Sample Application: Low


    http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/
    Perhaps the best of the Ruby-based MVC tutorials in this list, this page guides the reader through creating a Phonebook application using the Rails MVC framework. This guide is extremely detailed providing step by step instructions and then providing archived versions of the code for download at the end of the article. One thing this page does not provide is information about creating a Ruby on Rails development environment in the first place. For this, readers should review the "Revisiting Ruby on Rails Revisited" article.

    Completeness of Tutorial: Low
    Completeness of Sample Application: High


    http://www.webmonkey.com/05/28/index4a.html
    Another good site for learning how to create a basic Ruby on Rails application. This page also does not describe how to setup the Rails framework itself, but it does contain references to pages which do offer this information. The application tutorial itself is fairly simple, giving the user a quick "gee-whiz" reaction to show how easy it is to make Rails do something, but stops short of going into significant detail on how to customize the application or do moderately complex operations.

    Completeness of Tutorial: Medium
    Completeness of Sample Application: Low


    http://www.rails4days.pwp.blueyonder.co.uk/Rails4Days.pdf
    The most in depth tutorial on the list, this article advises a timeframe of four days to complete the tasks it lays out. These tasks take a new user from the ground up to implementing a full fledged Ruby on Rails MVC application. This includes getting the prerequisite software. The application implemented in this tutorial is a todo list application which makes good use of the supporting database concepts implemented by the Model as well as traditional html based Views. Though a bit intimidating because of its length, this is the most complete tutorial on creating a new Ruby on Rails application.

    Completeness of Tutorial: High
    Completeness of Sample Application: High


    http://www.sitepoint.com/article/ruby-on-rails
    This is an excellent article which takes the reader from "what is ruby" through MVC and Rails before culminating in a Rails-based application implementation. This article covers installation of the required components in addition to providing the code to implement the sample application and providing some basic instruction on Ruby syntax.

    Completeness of Tutorial: Medium
    Completeness of Sample Application: High


    http://instantrails.rubyforge.org/wiki/wiki.pl
    While not an actual tutorial, this site offers one stop shopping for getting a Ruby on Rails development environment and server up and running. InstantRails provides a solid foundational point for following one of the other application development tutorials since it ensures the reader has all the basic components (Ruby, Rails, database server, http server) needed to start doing Ruby on Rails development.

    Completeness of Tutorial: Low
    Completeness of Sample Application: Low

    MVC in Java (Non-Struts)

    These sites discuss creating MVC applications in Java without using the Struts MVC framework. Some of these tutorials provide guidance for creating web-based applications using JSP/Servlets, and others discuss how to leverage MVC in standard Java applications such as a Swing application. Note that many of these sites provide examples which require a JSP/Servlet container but do not describe how to set one up. As a result, many of them received low ratings on "completeness."


    http://javadude.com/articles/vaddmvc2/mvc2.html
    One of the few articles which implements a non-web-based MVC architecture in Java. This article shows how to apply MVC concepts to a typical Java GUI application. The article is extremely detailed, walking the user through the code with great care, ensuring that the reader should be able to apply the MVC techniques to their own Java application.

    Completeness of Tutorial: High
    Completeness of Sample Application: High


    http://www.articlegold.com/Article/Simple-J2EE-Model-View-Controller-Type-II-Framework/6091
    This article takes a truly generic approach to implementing MVC with Java. Rather than showing the reader how to implement a sample application using an existing Java-based MVC framework such as Struts, it implements its own MVC framework and then produces a sample application to run on top of that. While this is probably overkill for most users who would rather learn to build an application on top of a more widely used MVC framework, this approach offers a great deal of flexibility in showing the reader how to implement MVC in the absence of any assumed framework support.

    Completeness of Tutorial: Low
    Completeness of Sample Application: High


    http://www.informit.com/guides/content.aspx?g=java&seqNum=117
    This is another article which approaches using MVC in Java without assuming any specific MVC framework. Instead, it shows how to implement a simple MVC architected application using traditional JSP/Servlet components. To make the MVC association clear, it labels the components as controllers, views, etc, but it does not rely on anything beyond typical Java/J2EE components as it shows the user how to implement an MVC application in Java.

    Completeness of Tutorial: Low
    Completeness of Sample Application: High


    http://www.oracle.com/technology/sample_code/tech/java/jsps/ojsp/mvc.html
    This article offers a fully implemented sample application which leverages the MVC architecture using JSP components in Java. Although the article does not walk the user through the application with any great detail, it provides fully runnable source which an intermediate user could take and rework to implement their own MVC application in Java.

    Completeness of Tutorial: Low
    Completeness of Sample Application: High


    http://www.leepoint.net/notes-java/GUI/structure/40mvc.html
    This is another article which teaches the reader how to implement MVC in a standard Java GUI application. In this case, a calculator application is implemented using MVC concepts. Again, no specific MVC framework libraries are required, instead the article focuses on how to structure standalone objects in the role of Models, Views, and Controllers. An excellent article for someone looking to see how to apply MVC to their day to day Java code.

    Completeness of Tutorial: Medium
    Completeness of Sample Application: High


    http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html
    A more technical article aimed at people who already have a solid JSP/Servlet background. This article describes Java's Model 2 architecture which is in effect, MVC. The article implements an example shopping cart application using Model/View/Controller components. Again, no framework is required as the MVC logic is simply built into the application itself. This makes the example bulkier, but provides the reader with a more in depth understanding of how to implement MVC on their own without needing to rely on a framework which might or might not be appropriate to their deployment environment.

    Completeness of Tutorial: Low
    Completeness of Sample Application: Medium


    http://www.uta.fi/~jl/pguibook/mvc.html
    This fairly short web page discusses MVC in terms of the Java Observer/Observable pattern. Though it doesn't provide a concrete example application, it shows a rough skeleton of how to implement the Model/View/Controller components in Java using Observers/Observables. This is applicable to Java GUI applications rather than web-based applications, so readers looking to implement standalone Java GUIs would do well to read this guide in order to learn how to implement MVC in their Java application.

    Completeness of Tutorial: Medium
    Completeness of Sample Application: Low

    MVC in Java - Struts

    These tutorials all discuss creating MVC based Java applications by leveraging the Apache Struts MVC framework which is a powerful library for creating web-based MVC architected applications. It is most comparable to the Rails framework in Ruby. Many of these tutorials do not provide instructions for downloading and installing/configuring the Struts package, so they received low "completeness" ratings.


    http://struts.javabeat.net/tutorials/1-introduction-to-the-apache-struts.php
    A fine tutorial on the use of the Struts framework to implement an MVC application in Java, this page goes over the definition of MVC before launching into a discussion of the Struts framework. Finally it walks the reader through implementing an extensive sample application using Struts. Going beyond the typical hello world style application, the sample application used in this tutorial leverages some of the more complicated features of Struts including validation.

    Completeness of Tutorial: High
    Completeness of Sample Application: High


    http://www.ibm.com/developerworks/web/library/j-struts/
    This tutorial takes the user through implementing a simple mailing list application using the Struts framework. In order to enhance the value of this tutorial, it starts by implementing the application in a non-MVC style. It then shows how to restructure the application to leverage MVC via the Struts framework.

    Completeness of Tutorial: Medium
    Completeness of Sample Application: High


    http://www.theserverside.com/tt/articles/content/StrutsFastTrack/StrutsFastTrack.pdf
    This article gives an extremely in depth discussion of the Struts framework. Though likely to be intimidating to a new user, this is a logical next step for someone who's seen a simple example Struts application implementation. This article discusses the entire Struts API as it applies to the MVC pattern. However, it does not provide any sample implementation of an application, so it is best used as a reference source for understanding some of the other Struts-based example applications reviewed.

    Completeness of Tutorial: Medium
    Completeness of Sample Application: Medium


    http://struts.apache.org/1.x/userGuide/introduction.html
    This is the official documentation for the Apache Struts project. It is not structured as a tutorial, nor does it make for a good introduction to writing an MVC application using Struts. However, it is an excellent reference source for a developer working on a more in depth Struts application which goes beyond the simple examples provided in the other Struts guides.

    Completeness of Tutorial: High
    Completeness of Sample Application: Low

    References

    All sources used to create this wiki are linked in the above text.