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
Line 22: Line 22:


http://struts.javabeat.net/tutorials/
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, 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 useful and 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).


http://en.wikipedia.org/wiki/Model-view-controller
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.


http://hubpages.com/hub/MVC
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.


http://doc.trolltech.com/4.3/model-view-introduction.html
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. 


http://www.indiawebdevelopers.com/technology/java/mvcarchitecture.asp
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.


http://www.perlmonks.org/?node_id=402070
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.


http://msdn2.microsoft.com/en-us/library/ms978748.aspx
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.


http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/chapter02/chapter_2_section_3.html


http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf
http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf
Line 59: Line 72:


== example sites ==
== example sites ==
examples of when to use mvc/how to use the parts
This set of web sites provide good demonstrations of how to map an MVC solution onto a real world problem.  They 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.
 
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. 


http://java.sun.com/blueprints/patterns/MVC.html
http://java.sun.com/blueprints/patterns/MVC.html

Revision as of 05:34, 21 October 2007

Model-View-Controller Review of Resources

Written by Ben Parees

quick overview of mvc

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.

    introductory sites

    quick overviews

    These sites provide a 5 minute overview of the basic concept of Model-View-Controller.

    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.


    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).

    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.


    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.

    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.

    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.


    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.


    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.



    http://www.adobe.com/devnet/flash/articles/mv_controller/as2ess_ch18.pdf

    http://www.mobilefish.com/popupwindow/mvc_song.html

    http://www.mobilefish.com/tutorials/mvc/mvc.html

    http://ootips.org/mvc-pattern.html

    http://c2.com/cgi/wiki?ModelViewController

    http://www.themolehill.com/index.php/2006/07/29/beginners-guide-model-view-controller-mvc-architecture/

    http://www.practicalecommerce.com/blogs/developers-diary/archives/92

    http://best-practice-software-engineering.ifs.tuwien.ac.at/patterns/mvc.html

    http://slash7.com/articles/2005/2/22/mvc-the-most-vexing-conundrum

    http://orderedlist.com/articles/rails-and-mvc

    example sites

    This set of web sites provide good demonstrations of how to map an MVC solution onto a real world problem. They 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.

    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.

    http://java.sun.com/blueprints/patterns/MVC.html

    http://java.sun.com/blueprints/patterns/MVC-detailed.html

    http://www.informit.com/guides/content.aspx?g=java&seqNum=117

    http://www.codersource.net/aspnet_model_view_controller_sample.html

    https://users.cs.jmu.edu/bernstdh/web/common/lectures/slides_model-view-controller_pattern.php

    http://www.articlegold.com/Article/Simple-J2EE-Model-View-Controller-Type-II-Framework/6091

    http://www.enode.com/x/markup/tutorial/mvc.html

    http://www.csis.pace.edu/~bergin/mvc/mvcgui.html

    http://www.developer.com/java/ent/article.php/3336761

    http://www.slideshare.net/codeinmotion/mvc-demystified-essence-of-ruby-on-rails

    how to build an mvc application

    mvc in ruby - rails

    http://www.onlamp.com/pub/a/onlamp/2006/12/14/revisiting-ruby-on-rails-revisited.html


    http://www.devarticles.com/c/a/Ruby-on-Rails/Getting-Started-with-Ruby-on-Rails/2/

    http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/

    http://www.webmonkey.com/05/28/index4a.html

    http://rails.homelinux.org/

    http://instantrails.rubyforge.org/wiki/wiki.pl

    http://www.sitepoint.com/article/ruby-on-rails

    mvc in java - general

    http://www.oracle.com/technology/sample_code/tech/java/jsps/ojsp/mvc.html

    http://javadude.com/articles/vaddmvc2/mvc2.html

    http://www.leepoint.net/notes-java/GUI/structure/40mvc.html

    http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html

    http://www.uta.fi/~jl/pguibook/mvc.html

    http://www.csis.pace.edu/~bergin/papers/ModelViewController.html

    mvc in java - struts

    http://www.ibm.com/developerworks/web/library/j-struts/

    http://www.theserverside.com/tt/articles/content/StrutsFastTrack/StrutsFastTrack.pdf

    http://struts.apache.org/1.x/userGuide/introduction.html

    http://struts.javabeat.net/tutorials/1-introduction-to-the-apache-struts.php

    http://www.roseindia.net/struts/strutsguide.shtml


    additional references

    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.