Extending zeroCode
 
 
   
1
Next>
 
zeroCode's functionality can be extended in different ways. A major advantage of using zeroCode is that Business Logic can be handled and implemented easily, on the server. The output HTML from zeroCode can be customized with minimal changes in meta-templates and regenerating parts of a site, without having to hand-code a lot of changes. Custom UDMs can be created to access and modify data in complex user-interfaces. If XML is to be retrieved from a data source, without the HTML, zeroCode eliminates the work of a request handler. In such a situation a zeroCode-generated site can be used as a backend engine for insertion, display, update, etc.
 
The diagram below depicts the normal sequence in which things happen on the server in a zeroCode-generated site that uses a combination of XML and XSL, delivered to another component that builds the HTML.
 
The Request Dispatcher servlet receives the request from the browser and this request is routed to the appropriate Request handler class.
 
Request handler classes are responsible for processing each request, deciding the information required and the mechanism of getting it. They interact with data services by requesting and storing data. The data services layer is responsible for locating and storing data via various data ports. Data Access provides an interface for business services so the business services objects need not know where data is located or how it is accessed. Operation, validation and calculation may be applied to the retrieved data with the help of Business classes. Business classes are responsible for implementing business-specific rules.
 
When a response has to be generated, the request handler generates an XML document that includes the response data. The request handler class then calls the Response renderer to generate an HTML response for the response page. Here the HTML template from zeroCode has been changed to generate XML, eliminating the request handler's work.
 
The request handler processes the request to the zeroCode-generated backend engine. The engine gets data from the database and sends the raw XML to the request handler. When the servlet identifies the request, it generates the output HTML template. The generated raw XML is then delivered to the request handler. The request handler in turn sends the raw XML along with the appropriate XSL document to the response renderer. XSL can be used to manipulate, sort, and filter XML data. XSL transforms the raw XML into the well-formed HTML.
 
The Response renderer renders a given XML document with the corresponding XSL to produce an HTML response. This HTML response is sent to the browser.
 
   
1
Next>