Vijaya Shankar wrote:
> Hi !
> what is model 2 ?
>
"Model 2" is the informal name for a web application architecture based on the
Model-View-Controller design pattern that has been successfully employed for many
years in designing maintainable and enhanceable applications. There are several
benefits of using this approach -- one of the major benefits people look for is a
maximum degree of separation between business logic and presentation logic, so that
you can change one side with minimal or no impact on the other.
In the context of a web application, you tend to apply different technologies for
each of the three roles. A common approach is this:
* Model -- JavaBeans or EJBs that represent the current state of your
application. These will typically be stored in a user's session.
* View -- JSP pages that create the user interface.
* Controller -- A servlet that receives all form submits, calls an "action"
class to execute the appropriate business logic, and then forwards
control (via RequestDispatcher.forward) to the appropriate "next"
JSP page to create the visual response.
There have been many discussions of this concept on the JSP-INTEREST mailing list
over the last couple of years (check the archives at <http://archives.java.sun.com>
and search for "Model 2"), as well as an article in the December 1999 issue of
JavaWorld <http://www.javaworld.com>. If you want to see a framework that
implements these ideas and gives you a starting point for building your own
MVC-based app, check out the Struts framework at
<http://jakarta.apache.org/struts>.
>
> Thanks and regards
> Vijay
>
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets