These interfaces are defined using the standard curly braces, C-style class declaration. Notice that there is no implementation of the calculate_tax function here you provide that in your native language.įunction declarations are collected into interfaces, which represent all the defined methods for a class. The function also returns a value of type float. Here you have a function, calculate_tax, that receives a single input (by value) parameter, taxable_amount, of type float. For example, a function used to calculate sales tax on an order might be defined like this:įloat calculate_tax ( in float taxable_amount ) Instead, IDL concentrates on type definitions, both for primitive and class types, so you use it instead to define interfaces, not implementations. You can’t write actual programs in IDL because it lacks the logic and flow control structures you need to do anything useful with it. Vendors supporting each implementation provide compilers that convert IDL source into type libraries describing the component in question, so type checking can be done at compile time for the application using the component. Today, there are several varieties of IDL in use: OMG/CORBA, Microsoft, and KDE-DCOP are a few of the various implementations. So, IDL eventually came into widespread use as a way to define object interfaces in a language-neutral manner. Later, when work began on dynamic component reuse standards, such as CORBA and COM, those developers looked to the work done earlier with RPC for a standard. (So, if you’re versed in any of the C-like language families, including Java, C++, and C#, IDL's very C-like syntax will be familiar to you.)
#Idl in corba code#
When the DCE developers began looking for ways to automatically provide the needed marshalling code for RPC, they naturally adapted these header files-which most people were creating anyway-into a format useful for this task. This entails a process called marshalling, which involves gathering the data needed to make that function call to the remote computer.Īt that time, most programmers who needed to reuse code simply compiled C header files into an application to statically link the app with the reused code. The DCE created a standard way of carrying out remote procedure calls (RPCs), or calling a function across a network. IDL started out as part of the Open Group’s Distributed Computing Environment ( DCE). (For example, the W3C’s DOM specification documentation makes extensive use of IDL.) If nothing else, IDL is important for historical perspective, since it could be viewed as paving the way for technologies such as SOAP and WSDL, which make Web services possible.
#Idl in corba how to#
However, it can be handy to have a working knowledge of IDL in case you need to work some up on your own or need to read it to understand how to use someone else’s component. In most cases, the fact that you’re using IDL will be transparent to you it’s usually integrated into the tools and development platform you work with. It's used heavily by such technologies as CORBA and COM. Interface Definition Language (IDL) is a standard language for defining function and method interfaces for distributed or component-based applications.