
Contents
Primary Presentation
Element Catalog
Browser store front
Front end for the application. Usually a web browser like Firefox, Opera or Internet Explorer.
EJBActions
"Action classes place no restrictions on J2EE technologies available in each tier."
EJBController
"Interprets and executes events as EJB actions in the EJB tier. Events and EJB actions make it easy to add new business logic while maintaining a clear design".
EJBs
Beans of different types
Event Responses
Responses to the Events by the EJB Actions.
Events
Do not belong to a particular tier, they sit between the web and the EJB tier. They carry information of the events that occurred in the system. They are the output of the HTMLActions and the input for the EJB Controller and the EJBActions.
Front Controller
Receives and processes every HTTP request (except those intercepted by servlet filters). The Front Controller servlet coordinates all other control components to dispatch requests and to select and generate views. Because it is a servlet, it can create content of any type, including binary content types.
HTMLActions
"Action classes place no restrictions on J2EE technologies available in each tier."
petstoredb
Database for the Petstore ecommerce application.
Request Processor
"Maps request URLs to actions in the Web tier.Web-tier action classes make it easy for developers to add Web-tier functionality incrementally, while maintaining an easy-to-understand application design."
Screen Flow Manager
"Determines what screen to display after each request is serviced. Screen flow control is defined declaratively in an XML configuration file, so new views and screen flows are easy to add."
Servlet Filters
"May be placed in front of the Front Controller servlet to add functionality that applies to all requests."
Template https://wiki.sei.cmu.edu/confluence/display/SAD/Service:A servlet that "assembles multiple content sources, often JSP pages, into a template that provides a common look and feel to all views. Using JSP pages to create most content makes new views easy to construct."
Template Service
A servlet that "assembles multiple content sources, often JSP pages, into a template that provides a common look and feel to all views. Using JSPpages to create most content makes new views easy to construct."
Web Controller
"Dispatches events to the EJB controller"
Variability Guide
TBD
Other Information
Design Rationale
The choice of HTMLActions and EJBActions allow a developer to choose the most appropriate tier for new functionality.
Here is a sequence diagram that shows how a new user is created in the petstore application:
In the diagram, classes, referred in the static views, interact to create a user following the tier configuration mentioned in the primary presentation.
Reflections on the Manufacturer's Documentation
From Sun's documentation we get a diagram with runtime implications:
Source: Figure 11.6 Functional Modules for the Sample Application Web Site., (Diagram in MS Visio format)
- The Order Message module is not called in the petstore application.
- The Product Catalog does not invoke or controls the Control module.
- The Control module is a very high-level abstraction. Its granularity does not correspond to the granularity of the other modules, i.e., Sign On in a namespace in the components package whie Control expands through several packages: waf, petstore and some in the components package.
- There is still no clear indication of what role the user, the Site Home Page and the squared box play in the diagram
Here is another diagram from the manufacturer that is intended to show the flow of actions in the application:
Source: Figure 11.7 Model-View-Controller Architecture in Sample Application
The boxes in the diagram bring a good amount of useful information. Nevertheless, it can be argued that "Extract Data" component is too broad a generalization of the HTMLAction and Event workflow, but it can be said that from an architect's point of view, the diagram is focused on the interaction of elements (as the architecture should be) and not in the internal workings of the components. On the other hand, the connectors could be more specific on the type of information or actions they are doing. Except for the first connector, it is not clear what type of invocation is used.