Next Previous Up Top Contents Index

2.4 Defining the interface

2.4.1 Generating stub, skeleton, protocol code from IDL

There are two ways of generating the stub, skeleton, and protocol code for a CORBA application. We can either run the IDL compiler on the command-line, or we can run it within the Functional Developer development environment. The second option is more convenient given that we are already using the environment.

1. Go to the project window for the My-Hello-World-Client project.

Simply building the project in the normal way is enough to invoke the IDL compiler. This convenience is thanks to the spec file in the project Sources list: when the build gets to the spec file, the build system looks in it to see what to do with it. The spec file in My-Hello-World-Client states with the Origin: and Idl-File: keywords that there is a OMG IDL file to compile, and with the Stubs: keyword that a project containing client stub code should be generated.

If we build My-Hello-World-Client now, the IDL compiler will read the IDL file and create the stubs code. Meanwhile the rest of the Dylan code in the project is also compiled.

2. Select Project > Build from the project window's menu.

The spec file in My-Hello-World-Server is similar, but asks for skeletons instead of stubs.

3. Select Project > Build in the My-Hello-World-Server project window.

After the build, each project's Sources page is updated to include new subprojects. The subprojects are as follows.

In the client project:


The stubs project contains implementation glue code that enables a client application to call a CORBA object in a server application over a network, using a Dylan protocol generated from the IDL.

In the server project:


The skeletons project contains implementation glue code that enables server applications implementing CORBA objects to be called over a network by the Dylan protocol functions generated from the IDL.

In addition, a protocol subproject appears in both the stubs and the skeletons projects:


The protocol project contains open classes and generic functions, representing the spirit of the IDL declarations in Dylan. It is used in clients to call operations on CORBA objects in a server, and in a server as the basis of the implementation of those objects.

Developing Component Software with CORBA - 26 May 1999

Next Previous Up Top Contents Index