Application Adapters

An application adapter is a plug-in that is loaded when an application is loaded. CCF passes control to the adapter whenever an operation is being performed. This gives the developer an opportunity to write custom code to modify how an application behaves. Another way to look at application adapters is that they give developers of hosted Web and hosted external applications much of the same capabilities that hosted Windows Forms applications have.

An adapter is a managed code DLL that is loaded at run time in the same way that hosted Windows Forms applications are loaded. However, adapters do not have a UI and are not visible to the user.

An adapter can be used by a single application or it can be used by more than one application. When used by multiple applications, a separate instance of the adapter is created for each application.

There are two types of application adapters:

  • ApplicationAdapter – used for external (usually Win32) applications.
  • WebApplicationAdapter – used for hosted Web applications.

Both types of adapters provide virtual methods that can be overridden.

A best practice when using either type of adapter is to create it in a dedicated project, separate from the ID. This ensures that the adapter is a distinct entity that can be installed independently.

The Hosted Application Toolkit (HAT) allows you to create another type of adapter: a data-driven adapter (DDA). DDAs are assemblies that encapsulate the details of application UI interaction. In CCF 2009, Windows (Win32), Java, and Web applications are handled by the HAT. HAT workflows (called automations) use DDAs to drive hosted applications.

The HAT includes three ready-to-use DDAs:

  • WinDataDrivenAdapter for Windows applications
  • JavaDataDrivenAdapter for Java applications
  • WebDataDrivenAdapter for Web applications

Developers can create their own DDAs, either by building entirely new ones or by extending one of the DDAs included with HAT. For more information, see HAT Software Factory.