Web Application Architecture


Chapter 2 discussed the selection of a Web application architecture and presented a brief comparison of two specific architectures: JSP-centric and servlet-centric. We need to choose an architecture for bigrez.com that will meet the requirements and provide good maintainability and flexibility.

As discussed in Chapter 2, there are advantages and disadvantages to both architectures. Although the JSP-centric approach is simpler, and might make our job easier in this chapter and the next as we design and construct the example application, the resulting architecture would not be suitable for many medium- sized to large applications. We re focusing on best practices in this book, and we feel a servlet-centric approach should be considered a best practice for most production applications.

The Web application architecture for bigrez.com will therefore adopt the servlet-centric architecture described in Chapter 2 and implemented in the Person Tracker example program, available in the bonus material on the companion Web site (http://www. wiley .com/compbooks/masteringweblogic). Display JSP pages will present beans, forms, and business data to the user, and user actions and submitted HTML forms will be processed by the execute() method in page-specific Action classes. The difference is that bigrez.com requires much more sophistication both in terms of navigation and interaction with the business- tier layer. We ll discuss both of these areas in detail in a later section.

One key aspect of the chosen architecture is that controller components are responsible for loading required data into the proper context for display in the JSP pages. Action classes should interact with the business-tier components to retrieve the desired data and place it in the HttpServletRequest before forwarding to the next display JSP page. If the JSP page includes an HTML form, the Action class will create a form bean and place it in the request for use by the page.




Mastering BEA WebLogic Server. Best Practices for Building and Deploying J2EE Applications
Mastering BEA WebLogic Server: Best Practices for Building and Deploying J2EE Applications
ISBN: 047128128X
EAN: 2147483647
Year: 2003
Pages: 125

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net