Next Previous Up Top Contents Index

2.4 Defining the interface

2.4.2 A browsing detour

The next step would be to implement the client and server. But it is instructive to take a brief detour and look at what is inside the new projects that we gained by compiling our small IDL file.

1. Go to the My-Hello-World-Client project window and select the Sources page.
2. Expand the My-Hello-World-Stubs subproject.

As expected, the My-Hello-World-Stubs project contains the protocol project, My-Hello-World-Protocol.

3. Expand the My-Hello-World-Protocol subproject.

The my-hello-world-protocol.dylan file contains the automatically generated Dylan protocol representing our IDL for Hello World.

4. Expand the my-hello-world-protocol.dylan file.
5. Double-click on the generic function for world/hello.
The browser appears.

Figure 2.2 A Dylan generic function mapped from an IDL declaration.

Notice how the Dylan code has been mapped from the IDL. An IDL operation whose full name was world::hello has been mapped to a Dylan open generic function whose name is world/hello. The mapping rules are part of what is called an IDL binding for Dylan. There is a draft standard for the Dylan IDL binding in Appendix A, "An IDL Binding for Dylan".

6. Select the browser's Methods page.
7. Double-click on the only method listed.

The browser now shows the source of the method that takes care of bundling up arguments into a request and invoking the ORB in order to send it to the server. This method was generated automatically from the IDL, and "just works" -- you do not have to worry about it, or other such methods that the compiler generates.

Note: Since the compiler will regenerate these files if the IDL is changed, you should not edit them by hand.


Developing Component Software with CORBA - 26 May 1999

Next Previous Up Top Contents Index