Presentation is loading. Please wait.

Presentation is loading. Please wait.

CORBA and COM TIP Two practical techniques for object composition

Similar presentations


Presentation on theme: "CORBA and COM TIP Two practical techniques for object composition"— Presentation transcript:

1 CORBA and COM TIP Two practical techniques for object composition
X LIU, School of Computing, Napier University

2 CORBA Introduction Common Object Request Broker Architecture (CORBA) is an industry-standard distributed object model. A key feature of CORBA is IDL, a language- neutral Interface Definition Language. Each language that supports CORBA has its own IDL mapping. For example, as its name implies, Java IDL supports the mapping for Java. CORBA and the IDL mappings are the work of an industry consortium known as the OMG, or Object Management Group.

3 CORBA Architecture Any relationship between distributed objects has two sides: the client and the server. The server provides a remote interface, and the client calls a remote interface. These relationships are common to most distributed object standards, including CORBA.

4 CORBA Architecture From the beginning, the goal behind CORBA was to enable open interconnection of a wide variety of languages, implementations, and platforms. Thus OMG never settled on binary standards: everything is carefully standardized to allow for many different implementations and to allow individual vendors of CORBA-compliant products to add value.

5 CORBA Architecture

6 CORBA Architecture

7 Example: Hello World A one-method distributed object is shared between a CORBA client and server to implement the "Hello World" application.

8 Example: Hello World The definition in IDL of the example module HelloApp { interface Hello { string sayHello(); // Add this line }; }; The tool idltojava reads OMG IDL files and creates the required Java files idltojava Hello.idl

9 COM COM stands for Common Object Model. It is a standard proposed by Microsoft for the construction and integration of software components. COM is a binary standard. It specifies nothing about how particular programming languages may be bound to it. One fundamental entity in COM is an interface.

10 COM Interface On binary level, an interface is represented as a pointer to an interface node. The only specified part of an interface node is another pointer held in the first field of the interface node. The second pointer is defined to point to a table of procedure variables (function pointers). As these tables are derived from the tables used to implement virtual functions (methods) in languages such as C++, they are also called vtables.

11 COM Component A COM component is free to contain implementations for any number of interfaces. The entire implementation can be a single class, but it does not have to be.

12 COM COM does not support any form of implementation inheritance, although COM+ does. COM supports two forms of object composition to enable object reuse: containment aggregation.

13 Containment Containment is a simple object composition technique, i.e., one object holds an exclusive reference to another. The former, also called the outer object, thus conceptually contains the latter, the inner object. If requests to the outer object need to be handled by the inner object, the outer object forwards the request to the inner object.

14 Aggregation If deep containment hierarchies occur, or if the forwarded methods themselves are repatively cheap operations, then containment can become a performance problem. For this reason, COM defines its second reuse form: aggregation. Instead of forwarding requests, an inner object’s interface reference could be handed out directly to another outer object’s client. Calls on this interface would then go directly to the inner object, saving the cost of forwarding.

15 DCOM DCOM stands for Distributed COM. It transparently expands the concepts and services of COM to client-server systems. DCOM builds on the client-side proxy objects and the server-side stub objects already present in COM, where they are used only to support inter-process communication.

16 OLE OLE stands for Object Linking and Embedding.
It is a set of standards that enable objects complying with COM or DLL to be integrated into various application programs.


Download ppt "CORBA and COM TIP Two practical techniques for object composition"

Similar presentations


Ads by Google