Abstraction of the communication (provider model)
One of the key components of the HAF is the provider model for the communication with the host system. The provider model ensures that in the development process you have to pay no heed to the host and to the kind of communication. For the communication with the host system there are various providers at disposal (it is also possible to develop your own provider). Subsequently they can be switched without modifying the code. Thus it is not necessary anymore to determine a certain way of communication. This enables you to use a cost-effective provider for small installations and for bigger installations a provider designed for settings of these dimensions (for ex. Microsoft Host Integration Server Provider).
Client Initiated Processing
For client-side calls a DataAccess-Layer (DAL) and a BusinessRules-Layer (BRL) are generated. The generated code works internally only with the interfaces of the provider model. This ensures the possibility to switch the provider without modifications to the code.
While developing the HAF we always focused on the flexibility for the developer. Therefore the code-generator of the HAF always produces two files for each class – one for the generated code and one for the manually written code. This enables you to customize manually the result on any level and not to lose any modifications during the next? generation run.
Host Initiaited Processing (HIP)
To feature the call of functions for a host system, first the interface of the function (parameters, types, lengths et cetera) is defined in the Host Abstractor. From this interface the Host Abstractor generates a .NET-Interface having the same structure. Subsequently the interface can be implemented in a .NET-Assembly.
The .NET-Assembly will then be hosted by the HAF-Runtime for Host Initiated Processing. The HAF already provides a Windows service for this purpose. But with very little effort the Runtime can also be hosted in a customized application.
Host-side calls are processed with a provider model, too, because every backend-system works slightly differently. Usually providers offer a PlugIn for Host Initiated Processing to be used by the Host Abstractor, by means of which the host system can be prepared for the use of Windows-side functions. For example, the HIP-Provider for AS/400 systems adds to the Host Abstractor the feature to generate an RPG-program for every Windows-side function.
Provider-Gateways
In some cases (see example 1+2) the direct use of providers is impossible. For these cases the HAF provides so called Provider-Gateways, that “divert” the communication with the host. Such a gateway externally provides the same interface as any other provider. Internally the calls received by the gateway are passed on to a “real” provider.
By default the HAF contains two:
- Remoting (Windows service)
- Webservice
Example 1: You would like to program an application for Windows Mobile using functions of the host system. Unfortunately at the moment there is no provider for this platform, because they usually use 32-Bit APIs. But the Proxy-Provider integrated in the HAF (passes on calls to a gateway) is also available for Compact Framework. Then a central Gateway processes these calls by means of a “real” provider.
Example 2: You would like to realize host calls by means of a firewall with contentscan. Also in this case it is advisable to use a proxi-provider along with the webservice-gateway. This way the communication between client and gateway is realized via XML, which is able to control the firewall.


