Overview

This section shows how to implement a simple hello world component using the CCM Tools. Of course, this is not a real world application; creating a component just for a hello world example is really structural overkill. But the example is well suited to demonstrate the use of the CCM Tools.

Figure 3.1: Component development process
\includegraphics[width=10cm,angle=0]{DevelopmentProcess}

As shown in Fig. 3.1, the development process defines different roles that reflect different abstraction levels of components.

Component Designer
specifies the structure of the component by defining an Interface Description Language (IDL) File. The interfaces defined in the IDL source file(s) are only syntax definitions and do not describe the behavior of the component. These IDL declarations merely specify the methods that a component is required to implement. In this way, an IDL file is a sort of protocol definition for a component.

Component Developer
implements the behavior of the component with respect to the defined interfaces.

The CCM Tools support this development process by providing an IDL parser and different code generators. Each component has two logical parts, and generated code is used in both parts:

Component Logic
is the implementation of the component's structure. It contains mechanisms to create and destroy component instances, as well as access and navigation methods for finding and manipulating ports and attributes. This code can be completely generated from the IDL description.

Business Logic
is the implementation of the component's behavior with respect to the application domain. Generator tools can create skeleton code, but the component developer must implement the business code.

Happily, the component developer need not be a CORBA guru to implement these functions: Generated remote (out-of-process) component logic can handle the interface with a CORBA server.

Also, because of the nature of a component based application, the component developer should not implement a given component's business logic with an entire application in mind. Components are, on the contrary, meant to encapsulate well defined logical processes without caring about the overall structure of the application environment.

Finally, the CCM Tools make use of the Confix build tool to create a library from the generated (component logic) and hand-crafted (business logic) source code. The component libraries are stored in a component repository on the server side and are used to assemble modular, component based applications.

2003-11-09