JavaGen Architecture
JavaGen currently generates code for data-driven distributed applications,
including complete web apps.
Well-designed distributed applications utilize n-tier architectures whereby each
tier is an autonomous unit that
can be developed and maintained separately as technologies and business requirements change.
JavaGen generates code that complies with the generalized architecture framework illustrated
in Diagram 1.
|
|
DIAGRAM 1 - JavaGen Six Tier Architecture Template
|
This architecture has been gleaned from industry best-practices for development of
distributed applications, balancing separation of concerns with simplicity.
Designed by experienced J2EE developers, the emphasis of this architecture is
extensibility and maintainability. A subset of tiers can be used to suit the requirements
of a particular project, it is not an all-or-nothing architecture.
The following is a brief explanation of each tier:
| Client Tier |
This is the look-and-feel of the application.
JavaGen supports web clients using Servlet/JSP
technology in general and Apache Struts framework and
JSTL (Java Standard Tag Library) tags in particular.
JSTL tags give web developers
a powerfull, standard programming environment. Style
and content are kept separate using CSS.
Text is placed in property files for easy customization
and internationalization (i18n).
|
| Application Tier |
This tier consists of application-specific
work-flow usually implemented as Struts Action classes,
code to manage client state and client-specific business
logic. In general, this code accepts client requests,
delegates the request to the service tier, packages
the results for display by the client tier and finally
determines and invokes the next client display.
|
| Business Delegate Tier |
This tier packages services for client use, providing
caching and exception handling services as needed. It also
provides a clean interface for separating the client
and server tiers, allowing independent development and
testing.
|
| Services Tier |
Consisting of Session EJBs, this tier provides data-oriented
services such as searches and transactions. Making extensive use
of the Session Facade design pattern, this tier is the window into
the data for all higher-level tiers.
|
| Domain Tier |
Consisting of Entity CMP EJBs, this tier models the things
(think nouns) of the application and the
relationships between them. It also
serves as the O-R (object-to-relational) mapping layer,
handling the object to database conversions automatically.
|
| Database Tier |
Also called the persistence tier, this is were the
data resides. JavaGen supports most relational databases
by generating the SQL scripts for the creation of
database tables.
|
The domain tier can support multiple services in the service tier. Likewise, the service tier can support multiple
clients and client types.
For an extensive example using this architecture, see the JavaGen Petstore
|