Architecture Background

Problem Background

The Java Pet Store sample application is a working demonstration of the J2EE platform in a real application design. It was created by Sun Microsystems as part of the Java BluePrints program. This program defines the application programming model for end-to-end solutions using Java(tm) technology.

System Overview

The Java Pet Store sample application application resembles a business-to-consumer ecommerce website and the enterprise information systems (EISs) behind it. The Java Pet Store has a decoupled enterprise architecture that can interoperate with existing data sources and business partners’ systems, all built on top of the J2EE platform. This application comprises four separate sub-applications that cooperate to fulfill the enterprise’s business needs, each of which is a J2EE application:

  1. pet store e-commerce Web site (“petstore”). A Web application which shoppers use to purchase merchandise through a Web browser
  2. pet store administration application (“petstoreadmin”). A Web application that enterprise administrators use to view sales statistics and manually accept or reject orders. While petstoreadmin is a Web application, its user interface is a rich client that uses XML messaging, rather than an HTML Web browser
  3. order processing center (“OPC”). A process-oriented application that manages order fulfillment by providing the following services to other enterprise participants:
  4. supplier. A process-oriented application that manages shipping products to customers by providing the following services:

Here is a context diagram for the applications:

Source: Designing Enterprise Applications with the J2EE Platform. Figure 11.2

The following figure "provides a high-level view of the major modules of the sample application and the application's relationship to its key participants":

Source: Designing Enterprise Applications with the J2EE Platform, Second Edition. Figure 11.4

This figure misses a reference to the type of interaction between each module, but it can give us a high level overview of what applications are related.

Context and Scope

The Java Pet Store sample application is a working application. This Wiki is an overview of how an a-priori architectural documentation would have looked like. This Wiki concentrates on the architecture of the petstore. Future additions will offer more in-depth explanation of the other sub-applications.

Driving Requirements of the petstore

Categories and description

Shopping cart

User information

Interaction with the Order Processsing Center

Purchasing

Solution Background

From the Designing Enterprise Applications with J2EE book we are told that:

"the application can be divided into modules based on functionality. Such separation reduces the dependency between modules and allows them to be developed independently. In addition, identifying interfaces between modules enables modules to be developed by third-party component providers.

In this view, the application is divided into these modules:

Architectural Approaches to the Petstore

• Communication. The Java Pet Store website uses both synchronous and asynchronous communication. It "accesses its catalog synchronously, because accessing a catalog is a fast operation. [It] transmits purchase orders asynchronously because orders may take a long while to complete, and the order processing center may not always be available."

Based on the Sample Application Design and Implementation article.

Analysis Results

There a no results available. Trade studies, quantitative modeling, or other analysis results have not been scheduled.

Mapping Requirements to Architecture

The following use case diagram depicts the high-level system functional requirements:

''Source: Designing Enterprise Applications with J2EE. Figure 11.3 Sample Application Use Case Diagram.

The focus of this document are the customer requirements: