How to Use This Book


How to Use This Book

Since this book employs a blueprint-like approach, it is best to read this book from beginning to end. This book develops the use cases for the sample philanthropic application GreaterCause in Chapter 1 and then discusses the impact of information architecture on evolving the use cases in Chapter 2. Chapter 3 is an optional read, however we encourage the readers to skim through the Application Architecture section as it sets the stage for the rest of the book. If you are already familiar with Struts and the related architecture then you can skip Chapter 4. Chapter 5 through 7 builds components for each of the application tiers and the associated use cases are realized incrementally in each of these chapters. Chapter 8 implements a Web service using the components developed in Chapters 6 and 7. Please note that the Web service implementation in Chapter 8 is based on BEA WebLogic Workshop. Chapter 9 provides information on installing and exercising the sample application. If your choice of application server is WebLogic, then Chapter 9 provides step-by-step instructions on installing the WebLogic Server 7.0, and deploying and exercising the sample application.



About Companion Website and Download

The sample application with accompanying binaries, source files, documentation, and errata links is available at http://www.osborne.com. Please follow the instructions provided by Osborne Media to locate the book specific links. References to source distribution in this book refers to the source made available in the download package. Complete information on the content of the download package is provided in Chapter 9.



Organization of this book

Part I, Requirements and Architecture Definition consists of Chapters 1 through 3.

Chapter 1, "Requirements Analysis with Use Cases" explains the process of defining the problem domain in the form of a use case view of the system. The sample application is decomposed into discrete functional units, with each such functional unit expressed as a separate use case. Each use case is explained using a standardized template, which explains the system behavior from the perspective of external entities interacting with the use case. A use case view is essential for creating a common understanding of the system behavior between the business domain experts, the application architect, and developers, without specifying how that behavior is implemented. The use case view developed for the sample application is prerequisite for understanding other chapters of this book.

Chapter 2, "Information Architecture for Use Case Elaboration" explains the impact of information architecture for comprehensively defining the use cases. In this chapter, we elaborate the use cases of our sample application by being more explicit in expressing the user interaction with the system, and the associated transactional semantics. Information architecture is crucial for devising schemes for organizing, labeling, navigating, indexing, and searching content. These aspects converge into a storyboard when creating a prototypical-view of the system's UI. The navigation semantics of the application are explained using a site flow that clearly articulates the page transitions associated with user actions—this information will be used when configuring the Struts framework.

Chapter 3, "Application Architecture, Security, and Caching" introduces important aspects of application architecture as it pertains to the J2EE platform (although the actual architecture of the sample application is gradually build throughout this book using a use case driven approach). This chapter discusses security, and provides a high-level architectural overview in the context of prominent technologies and specifications which should assist the readers in determining their unique security infrastructure needs, and the eventual selection of a best-of-breed solution. This chapter also covers federated network identity based on the Project Liberty Architecture. Finally, the chapter ends with a discussion on caching that explains common caching solutions and explores a basic caching architecture.

Part II, Design and Construction consists of Chapters 4 through 9.

Chapter 4, "Struts-Based Application Architecture" discusses the benefits and design considerations for a presentation-tier framework based on Model-View-Controller architecture. This chapter discusses key aspects of such a framework in the context of Struts. We explore Struts architecture, its implementation and configuration semantics, and basic usage for providing quick familiarity to our readers on varied aspects of Struts. The material provides under-the-hood information on Struts, giving readers the necessary background to evaluate its applicability in their problem domain. The information provided in this chapter will be adequate to follow the use case realizations in Chapter 5.

Chapter 5, "Presentation Tier Design and Implementation" is focused on use-case realization for the presentation tier functionality of the sample application. Emphasis in this chapter is on creating the static and dynamic models of the system while utilizing the best practice J2EE design patterns for realizing client-side semantics. This chapter also identifies Struts implementation patterns that provide repeatable solutions for solving complex user interactions. Templates can be derived from these patterns for assisting the development team in establishing a consistent design vocabulary and implementation across all use cases, thereby improving readability and maintainability of the code. These patterns will serve as a starting point from which to evolve.

Chapter 6, "Domain Model Design and Implementation" is focused on creating a domain model and the corresponding database schema for persisting the domain objects. In this chapter we identify domain entities and their relationships. We use J2EE container services to both access and persist the domain entities and their relationships. This chapter also discusses configuration aspects of container-managed fields and container-managed relationships for entity beans with container-managed persistence. The domain model implemented in this chapter forms the basis for implementing business tier components in Chapter 7.

Chapter 7, "Business Tier Design and Implementation" is focused on use-case realization for the business tier functionality of the sample application. This chapter discusses and implements several best-practice business tier design patterns. Emphasis in this chapter is on identification of appropriate design patterns in the context of our problem domain and the application of these patterns for solving common problems during the design and development of the business tier. This chapter also discusses the configuration aspects of stateful and stateless session beans and the transactional semantics associated with Enterprise JavaBeans.

Chapter 8, "Web Services for Application Integration" introduces the Web services technology and its associated standards. It brings to light key aspects of the WSDL and SOAP specification so that readers are able to discern the relationships between WSDL constructs and the corresponding SOAP message constructs. The concepts learned in this chapter are subsequently applied in the creation of a Web service in the context of our sample application using BEA WebLogic Workshop.

Chapter 9, "Application Assembly and Deployment" focuses on installing and configuring the WebLogic Platform 7.0, and deploying the sample GreaterCause application.