| Red Hat Docs > Manuals > Red Hat Web Application Framework > |
The Red Hat Web Application Framework architecture comprises the layers, the kernel, and the applications.
There are four layers (also known as tiers) in the Red Hat Web Application Framework architecture:
The Presentation Layer contains the servlets/pages and stylesheets that comprise the user interface (UI) of the system.
The Domain Logic Layer contains Application Objects, which are Java objects that fall into one of two basic categories:
Abstractions of entities that exist in the business domain, for example, Party, Person, Group, Company, Department, Team, Product, Order, Line Item
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.
The Data Layer contains:
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
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
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 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:
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.
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:
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 fundamental Application Objects on top of which all Red Hat Web Application Framework applications are built, for example, User, Group, Permission:
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:
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
Finally, each Red Hat Web Application Framework application adds code and other assets (stylesheets and PDL files) to each layer of the architecture: