HAF Screenshots
Code Generation Studio
The scope of delivery of the Host Abstraction Framework contains a license of the Diomex Code Generation Studios.
This application enables you to generate and update a certain model and to release it in different languages for different platforms. One of the highlights of the CGS is the generation for the .NET Compact Framework and the support of Microsoft Team Foundation Server.
If the HAF project is large, the respective model will grow very quickly, too. In order to still be able to find information quickly, CGS contains a flexible search enabling to browse the entire model or only certain areas of it (for ex. name spaces or data base structures).
After the model has been created or modified, the model is translated into a source code by the means of the Code Generator. CGS supports different languages, platforms and different versions of Visual Studio. If the project to be generated is lying within the source code management (e.g. Microsoft Team Foundation Server), the CGS can recall existing files and analyse them. New files are automatically inserted into the source code management.
Import and Export of RPG source
Once the functions to be imported have been selected, you define where the functions and data structures are to be created within the model. At this point the CGS detects, whether compatible structures for the parameters of the function to be imported exist already within the model and proposes them.
When creating new functions, it is reasonable to generate first the model and then the host side function. To facilitate this, CGS contains a function for generating RPG sources. The export function creates on one hand the data structure as well as an »empty« RPG program with the respective parameter task bar. The sources can be stored either on a hard disk or directly to an iSeries system via FTP.
Validating RPG Sources
To make sure that the structures determined within the model match with the programs of the host system, the CGS contains a function for validating the host interface. For this purpose, it retrieves the sources of the host program from the host system, analyses them and compares the respective parameters to the model.
Generating Stored Procedures for DB2-Provider
One of the possible communication providers for HAF based applications is the »HAF-Provider für IBM .NET DB2-Provider«. This provider retrieves functions from the host system as stores procedures. Since in the run-up to this, a stored procedure for each program has to be created, the CGS features a function for creating them automatically by the means of the model.
Generating Business Objects
Once the host side data structures have been defined in the Host-Access-Layer, these structures can be used for generating business objects in the so-called Business-Rules-Layer. In this step all the fields of a structure can be adopted automatically as properties in a new business object.
One of the biggest advantages of the HAF model is the possibility to connect business objects by the means of caches and function retrieval. The result is an object model that, regarding its handling, does not differ from a pure .NET application, even though behind an HAF based application you can find regularly a very old backend, which is not object orientated.
Debugging with the Trace Analyser
Apart from the Code Generation Studio HAF encloses an application for debugging HAF based applications, the Trace Analyser. It allows logging the communication with the host system. Moreover, the TA permits the execution of single host functions step-by-step and also the reapplication of host functions with identical parameters.
The Trace Analyser can communicate through different channels with an HAF based application. Thus, it is possible for example, to debug an HAF based application through the network. The screenshot shows the dialogue for selection the communication channel.



















