Early web application design regarded the JSP page as the focal point for the entire application. Termed Model 1 architecture, the JSP page not only contains the display elements to output HTML, but is also responsible for extracting HTTP request parameters, call the business logic (implemented in JavaBeans, if not directly in the JSP), and handle the HTTP session. Although Model 1 is suitable for simple applications, this architecture usually leads to a significant amount of scriptlets (Java code embedded within HTML code in the JSP page), especially if there is a significant amount of request processing to be performed.
The following diagram illustrates the JSP Model 1 architecture.
As a response to the Model 1 architecture, Apache Software Organization developed the Jakarta Project's Struts framework. Struts is an open source framework for building web applications that integrate with standard technologies, such as Java Servlets, JavaBeans, and JSP. Struts offers many benefits to the web application developer, including Model 2 implementation of Model-View-Controller (MVC) design patterns in JSP web applications. The MVC Model 2 paradigm applied to web applications lets you separate display code (for example, HTML and tag libraries) from flow control logic (Struts action classes).
The following figure illustrates the Model 2 web application architecture, where Servlets control the flow of the web application and delegate the business logic to external components, usually JavaBeans or EJBs, while JSP pages generate the HTML for web browsers:
The following information gives a brief overview of the MVC Model 2 design pattern and the role of Oracle ADF:
When you create your web application using the Oracle Application Development Framework (Oracle ADF), binding to the model layer is handled for you. Otherwise, you will need to create the data binding implementation for the view layer. For additional information about Oracle ADF, see About the J2EE Platform and Oracle ADF.
When you use the Oracle Application Development Framework (Oracle ADF), you can take advantage of the data binding facilities in JDeveloper that allow your web pages to display databound dynamic content from the model layer. For complete information about the data controls in JDeveloper, see About Oracle ADF Data Controls.
When you use the Struts Page Flow Diagram in JDeveloper, you can work with a visual representation of the application logic. For additional information about the design time for Struts, see About Struts Support in JDeveloper.
For further background about Oracle ADF:
For page-flow design guidelines:
To learn how you can implement Model 1 and Model 2 web applications:
Copyright © 1997, 2004, Oracle. All rights reserved.