Solved

Please Explain Differences in Detail MVC,MVC1, MVC2, Jsp Model1, JSP Model2, Model1, Model2

Posted on 2004-10-26
692 Views
Last Modified: 2012-06-27

Hello All,

   From few days I am hearing few Desigh Patterns, Please can any one explain in detail.

   Here are those Design patterns, Please explain in detail

   Model1, Model2, MVC,MVC1, MVC2, Jsp Model1, JSP Model2,

Thanks in Advance
Naveen  

 
     
0
Question by:Naveen13
    10 Comments
     
    LVL 8

    Accepted Solution

    by:
    Model 1 and Model 2
    http://helponline.oracle.com/jdeveloper/help/state/content/navSetId.jdeveloper/navId.4/vtTopicFile.jdeveloper%7Cdeveloping_mvc_applications%7Cadf_aboutmvc2~html/

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

    (Taken from javafaq.nu)
    You should use Model 1 only for simple applications and when you want to get something done quickly.
    The main problem with Model 1 is that it is hard to maintain and change (luck of flexibility).
    Model 1 architecture is best when the page navigation is simple and fixed, and when a simple directory structure can represent the structure of the pages in the application. Such applications usually embed the page flow information in the links between the pages. The presence of forward in a JSP page implies that logic embedded in the page is making a decision about the next page to display.

    Model 2 is recommended for medium- and large-sized applications or applications that will grow in complexity in the future.
    Over time, as the application grows and changes, page flow logic accumulates. The application becomes difficult to maintain because the page flow logic is distributed across multiple pages. The best time to switch from Model 1 to Model 2 is before this maintenance problem arises. This is why it's usually best to choose Model 2 from the outset, basing the application on an existing Web controller framework that best meets application requirements. Model 1 remains a viable option for simple, static applications.



    MVC1 and MVC 2 (taken from www.theserverside.com)

    MVC1 was a first generation approach that used JSP pages and the JavaBeans component architecture to implement the MVC architecture for the Web. HTTP requests are sent to a JSP page that implements Controller logic and calls out to the “Model” for data to update the “View.” This approach combines Controller and View functionality within a JSP page and therefore breaks the MVC paradigm. MVC1 is appropriate for simple development and prototyping. It is not, however, recommended for serious development.

    MVC2 is a term invented by Sun to describe an MVC architecture for Web-based applications in which HTTP requests are passed from the client to a “Controller” servlet which updates the “Model” and then invokes the appropriate “View” renderer-for example, JSP technology, which in turn renders the View from the updated Model.
    The hallmark of the MVC2 approach is the separation of Controller code from
    content. (Implementations of presentation frameworks such as Struts, adhere to the MVC2 approach).

    If you want to read a more detailed doc:
    http://hk.sun.com/education/certification/sunone/files/chapter8.pdf
    0
     
    LVL 35

    Assisted Solution

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

    Covers JSP Model 1 and 2 and the differences..

    Model 2 is a MVC (Model, View Controller) design pattern...

    I have no idea what MVC1 or MVC2 are...
    0
     

    Author Comment

    by:Naveen13

    Thanks for ur Information,

    But I need the differences

    Thanks
    Naveen
    0
     
    LVL 35

    Expert Comment

    by:TimYates
    Did you look at that javaworld article we both posted?

    kiranhk's comment should answer all your problems...you aren't really going to get a better answer than that...
    0
     
    LVL 35

    Expert Comment

    by:TimYates
    JSP Model 1  == a JSP implementation of MVC 1
    JSP Model 2 == a JSP implementation of MVC 2
    0
     
    LVL 8

    Expert Comment

    by:kiranhk
    there is no tabular format differences between these architectures. you can get all the differences from the links we posted and the brief explaination we have given.
    0
     
    LVL 8

    Expert Comment

    by:kiranhk
    did you find any of the suggestions useful?? havent heard from you for a long time
    0
     

    Author Comment

    by:Naveen13

    Yes, I refered so many sites and got the following information.

    there is no MVC1, MVC2 arctictures officially.. see sun's,appache sites they will describe Model1 and Model2 architecture... they won't mention even the words MVC1, MVC2 in their sites..

    so Model1 and Model2 both are MVC design patterns...

    Model1 uses jsp as a view as well as controler.
    Model2 uses jsp as a view and servlets as a controler.

    Thanks
    Naveen

    0
     
    LVL 8

    Expert Comment

    by:kiranhk
    thats the info what i posted already right???
    0
     
    LVL 8

    Expert Comment

    by:kiranhk
    can you close this question... its been more than 3 months...........
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
    This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now