[Previous] [Contents] [Next]

Chapter Sixteen

Interface Definition Language

It is widely acknowledged that the language used to express an idea both limits and shapes what can be expressed. Likewise, while the COM+ infrastructure is entirely divorced from the source-level languages used to access or create components, the available tools and languages have heavily influenced its design. The design of COM, and by consequence COM+, was strongly affected by C++, the most widely used object-oriented programming language; by Microsoft Windows, the platform that gave birth to COM+; and by Remote Procedure Calls (RPC).

RPC has contributed to the design of COM+ in several key areas. The RPC infrastructure enables COM+ to work across a network, and Interface Definition Language (IDL), the language developed to define RPC client/server interfaces, was adopted and extended for the definition of COM+ interfaces and classes. You can create components without IDL, and tools far better than Microsoft IDL (MIDL) might be developed in the future. Nevertheless, the importance and centrality of IDL to the design of COM+ cannot be underestimated. In this chapter, we'll explore IDL and its effect on the COM+ programming model.

As anyone who has worked on large-scale projects involving network communications knows, defining the interface between a client and a server and ensuring that both sides correctly adhere to that interface is one of the biggest challenges faced by the developer. The original goal of IDL was to encourage the client and server projects to agree upon and specify the communication interfaces and then follow those contracts. To achieve this end, the designers of IDL had to surmount several problems, which we'll describe below.