Model 2

From Wikipedia, the free encyclopedia

Jump to: navigation, search

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

Personal tools
Languages