COM Automation for the Web

Abbrevia's data compression capabilities are provided in three component formats. The format you decide to use depends on the kind of your development tool.

For Embarcadero Delphi and C++Builder developers, Abbrevia's native VCL controls are the best way to gain access to Abbrevia’s capabilities. The native VCL controls in Abbrevia work just like the ones that come with Delphi and C++Builder. Because VCL controls are written to work specifically with these compilers, they install directly into the compiler's development environment and work like the controls you already use. The functionality embodied by the VCL controls can be compiled directly into your application so there is nothing extra to distribute with the EXE file of your program.

For Linux development, Abbrevia offers components that use the CLX format. Abbrevia's CLX components work much in the same way as the components that come with Kylix, so you'll find them easy to install and access.

For Internet and intranet development, however, native VCL or CLX controls are not good choices. If you're building web-based applications you should instead investigate the COM Automation Object that's also included with Abbrevia.

Abbrevia's Automation Object gives you full access to Abbrevia’s extensive PKZIP-compatible compression engine. For web developers this means that you can now create web applications that can compress data "on the fly" before it gets sent to the browser.

Understanding COM Automation objects

An automation object is a particular kind of COM object that can be controlled by another application, sometimes called an automation server. You may have already experienced automation objects such as Microsoft Excel, which allows you to access through code the spreadsheet functionality that is normally accessed through the program’s user interface.

The definition for automation objects might naturally lead you to ask then what COM is. What follows is a brief overview, though it's hardly exhaustive. You can learn a lot more about COM on the Microsoft web site. There are also a number of books about COM. For a particularly good treatment of COM development with Delphi, we recommend Delphi COM Programming by Eric Harmon (Macmillan Technical Publishing; ISBN: 1578702216).

COM stands for Component Object Model, a software architecture developed by Microsoft that allows components made by different software vendors to be combined into a variety of applications. COM defines a standard for component interoperability, and Abbrevia’s Automation Object adheres to this standard. Abbrevia’s Automation Object is a server that can provide PKZIP-compatible data compression to client programs that properly create an instance of it.

Because COM isn’t dependant on any particular programming language, you can build COM Objects and use them in a variety of application development tools. Abbrevia’s Automation Object, for example, was written using Embarcadero Delphi. But you can invoke its capabilities using VBScript if you install the Abbrevia Automation Object on your Microsoft IIS web server.

Note: TurboPower initally embarked on the creation of the Abbrevia Automation Object to meet one of its own needs for the TurboPower web site. Though you can also use the Abbrevia Automation Object in other development tools capable of hosting Automation Objects, such as Microsoft Visual Basic, TurboPower’s most extensive testing has been with web development.

Unlike native VCL controls, COM Objects are packaged as EXE files or in dynamic link libraries (DLLs) that must be shipped with your application. The Abbrevia Automation Object is a DLL. If you choose to implement Abbrevia’s functionality by using its Automation Object, you will need to ship and properly install the ABBREVIA.DLL file too.

The Abbrevia Type Library

In addition to the Automation Object itself, Abbrevia also ships with a Type Library that describes the object’s interface. Type Libraries are necessary so that client programs can get the names of the objects, methods, and properties in the COM Object. Some development tools can read the Type Library to help simplify your access to the COM Object. You do not have to ship the Abbrevia Type Library with your application.