Chapter 5: Presentation Tier Design and Implementation


Overview

Chapter 1 started out with a high-level use case view. Chapter 2 employed information architecture to move toward a detailed use case view. Chapter 2 provided us a sense of process flow, transactional semantics, and subsystem interactions. Chapter 4 was a look at using Struts as a framework of choice for implementing the presentation tier. If you have not reviewed Chapter 4, please do so before proceeding with this chapter. The use case view developed in Chapters 1 and 2 is employed for creating a project plan; this use case view can provide us with essential information for planning work allocation to development teams, while identifying architecturally significant use cases for building our first thread of end-to-end functionality. The development process in this chapter follows the use case-driven approach; this will provide us with the traceability required for adhering to the functionality prescribed by the use cases in Chapters 1 and 2.

While the focus of Chapter 4 was to explain the architecture employed in creating a presentation framework, and to provide the essential base for working with Struts, this chapter focuses mainly on implementing the use cases using the Struts framework. Emphasis in this chapter is on creating the static and dynamic models of the system, and identifying patterns that provide repeatable solutions for solving complex user interactions. Templates can be derived from these patterns for assisting the development team in establishing consistent design vocabulary and implementation across all use cases. In this chapter, we will develop presentation-side tier functionality for all the use cases identified by the packages GreaterCause Site Administration, Manage Campaigns, and Search NPO. We have endeavored to implement these use cases using different design implementation patterns to provide readers with insight into leveraging the Struts framework in different ways; these patterns will serve as a starting point from which to evolve and create more repeatable solutions by leveraging several other features of Struts not covered by this book. Since the focus of this book is architecture, a large portion of this chapter is dedicated to discussing design implementation patterns that can be used repeatedly in creating consistent solutions across the system.

To follow along with this chapter, you may want to install the GreaterCause application, as explained in Chapter 9. The complete administration functionality of the GreaterCause application is rooted in the Administrator Services button on the GreaterCause.com home page. Appendix C provides a complete site flow for Administrator Services.

Note

Readers of this book should have a basic knowledge of servlet and JSP technologies. In order to provide an optimum reading time, we have deliberately tried to avoid explaining these technologies. Should you desire to learn about servlets and JSPs, excellent tutorials are available at java.sun.com and at the sites of J2EE container vendors.

The class diagrams depicted in this chapter will cover the presentation tier components and related vocabulary; the business tier (service layer) model and associated design patterns are explained and developed in Chapter 6 and Chapter 7. So long as the business interfaces are clearly defined for the business tier, construction of components in the presentation tier can be done in parallel with the construction of components in the business tier. In large projects, we tend to use the specialized skill of a web production team, presentation tier engineers, and business tier engineers. Therefore, for each use case being developed, the artifacts created by this cross-functional team must be available at the right time for integration testing to proceed. Parallel development of different tiers has to be managed effectively in order to provide a cohesive set of deliverables that can be tested end-to-end; the key learning from the integration testing can be leveraged by the subsequent iterations in creating quality deliverables.




Practical J2ee Application Architecture
Practical J2EE Application Architecture
ISBN: 0072227117
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Nadir Gulzar

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