Architecture

The Red Hat Web Application Framework architecture comprises the layers, the kernel, and the applications.

The Layers

There are four layers (also known as tiers) in the Red Hat Web Application Framework architecture:

Figure 1-1. Basic Configuration

Presentation Layer

The Presentation Layer contains the servlets/pages and stylesheets that comprise the user interface (UI) of the system.

Domain Logic Layer

The Domain Logic Layer contains Application Objects, which are Java objects that fall into one of two basic categories:

Domain Objects

Abstractions of entities that exist in the business domain, for example, Party, Person, Group, Company, Department, Team, Product, Order, Line Item

Process Objects

Encapsulations of domain-specific processes that typically involve manipulating several Domain Objects, for example, "Grant Permission", "Hire Employee", "Cancel Order".

Domain Objects have identity and state, while Process Objects typically have neither.

Data Layer

The Data Layer contains:

Data Objects

Provide read and/or write access to the persistent properties of Domain Objects; concretely, Data Objects are implemented as a Java class library that supports CRUD (create, read, update, and delete) operations for any type of Data Object, through a set of generic interfaces, specifically, DataObject, DataCollection, and DataAssociation

Persistence Metadata

Describes each type of Domain Object (its name, its properties, how each property is mapped into the Data Storage layer, etc.) in Persistence Definition Language (PDL) format

Data Storage Layer

Contains the mechanism(s) employed for storing data persistently; typically, a relational database and a data model (may also include other mechanisms, such as an LDAP directory and schema).

The Kernel

The Kernel is a set of software components that span all four layers of the aforementioned architecture and serve as building blocks for Red Hat Web Application Framework applications:

The Red Hat Web Application Framework Architecture

Figure 1-2. Basic Configuration

As shown above, the kernel is a layer providing a set of persistence, domain, service, and presention systems on top of any standards-compliant servlet container and SQL RDBMS. The kernel architecture can be loosely divided into two pieces: infrastructure and framework.

Infrastructure

Contains software to support the mechanics of application building at each layer of the architecture (for example, serving page requests, styling the user interface, logging, specifying metadata, storing data, etc.), independent of any specific problem domain:

Red Hat Web Application Framework: Infrastructure

Figure 1-3. Basic Configuration

Framework

In his seminal book Analysis Patterns, Martin Fowler writes that a framework "... should be applicable across a large domain and be based on an effective conceptual model of that domain" (p. 11). Accordingly, the Framework defines a set of Application Objects that are encountered in the problem domain of many (or, in some cases, all) Red Hat Web Application Framework applications. This object model further subdivides into two categories:

The "Kernel"

The fundamental Application Objects on top of which all Red Hat Web Application Framework applications are built, for example, User, Group, Permission:

The Kernel: Infrastructure and Framework (Kernel only)

Figure 1-4. Basic Configuration

Framework Services

Building blocks that address generic requirements that are common to many but not all Red Hat Web Application Framework applications (each of which defines a set of related Application Objects), for example, Versioning, Workflow, Categorization:

Figure 1-5. Basic Configuration

As shown above, the Framework also contains:

  • A user interface for interacting with the Framework's Application Objects

  • The metadata (PDL) and data model (DDL) required for persistence of the Framework's Domain Objects

Applications

Finally, each Red Hat Web Application Framework application adds code and other assets (stylesheets and PDL files) to each layer of the architecture:

Red Hat Web Application Framework Applications

Figure 1-6. Basic Configuration