Server Architecture Overview
The Java server is logically divided into several distinct layers, with different responsibilities. Form the point of view of a request from the browser, there are a handful of general-purpose data-centric servlets that can handle any service requests. These servlets handle HTTP requests and transform them into data objects and commands for further processing. Once an appropriate service is identified for handling a request, its metainfo is used to build a rich Java data structure from the (string-based) browser data representation. This data, in turn, forms the input to a Java service class.
In our terminology, a page service is a self-contained piece of server functionality that principally acts upon a particular "root" Java entity object (and table) and its child entities (tables). The framework automates the process of mapping data to and from these entities by making use of the service XML metainfo. These Java objects are also known as domain objects. These objects are made persistent via Hibernate, which offers the simpler HQL query language as an alternative to "raw" SQL. In the simplest cases, no human-written imperative code need be written to implement a page service.
For updates, validation is handled via both automatic logic determined by database metadata, including application-level referential integrity checking, and hand-coded validations implemented by change-handler classes.
For presentation-level requests (e.g. HTML constructs) the server uses XSL/T to create HTML from our UI metadata structure. Since UI layouts are fairly static the web presentation layer uses caching to help optimize performance.
The development process is geared to keeping generated and human-maintained artifacts completely separate. For instance, we generate superclasses that contain generated code that is e.g. required by Hibernate or the service framework, and programmers will implement subclasses that implement methods for unusual or extra behavior.
The artifact generation is driven principally by parsing special markup in Java sources known as annotations, combined with metadata held in the database (principally relating to tables, fields, and constraints). On a modern machine (eg. 3 GHz P-4) artifact generation for the entire system takes only a few minutes.
Parent topic