design info344 j2ee java jsp model2 mvc patterns programming software software_engineering web_framework webdesign
Model 2
From Wikipedia, the free encyclopedia
This article includes a list of references or external links, but its sources remain unclear because it lacks inline citations. Please improve this article by introducing more precise citations where appropriate. (September 2008) |
This article is about the Java design model. For the arcade board, see Sega Model 2.
In the design of Java Web applications, there are two commonly-used design models, referred to as Model 1 and Model 2.
Model 1 is simpler and only recommended for small applications. Model 2 is recommended for medium- and large-sized applications.
Model 2 uses the Model-View-Controller (MVC) design pattern to separate presentation from content.
In a Model 2 application, requests from the client browser are passed to the controller, which is a servlet. The controller decides which view (JSP) it will pass the request to. The view then invokes methods in a JavaBean (which may access a database) and returns the Response object to the Web container, which is then passed on to the client browser.
[edit] See also
- Apache Struts is an open-source framework for implementing web-applications based on a Model 2 architecture.
[edit] External links
- Understanding JavaServer Pages Model 2 architecture by Govind Seshadri (JavaWorld)
- Brian's waste of time - a history of MVC, including Model 2.