|
The Developer's Resource & Community Site
|
Activex & Component Object Model
Author: Gopalan Suresh Raj
Date Submitted: January 26th 2000
Level of Difficulty: Beginner
Subjects Covered: COM
Pre-required Reading: None
Introduction
Traditional operating systems only dealt with application binaries and not components. Hence, the benefits of good component-oriented design have till now never gone beyond the compilation step. In an object-centric world is’nt it still a puzzle why operating systems can’t recoganize objects? For a long time now, operating systems have been dealing only with application binaries a.k.a. EXEs. Objects in one process could not communicate with objects in another process using their own defined methods. The operating system defined certain mechanisms of inter-process communication like DDE, TCP/IP, Sockets, memory-mapped I/O or named pipes etc. These objects needed to use these OS defined mechanisms to communicate with each other.
ActiveX/COM - A Truly Distributed Object-Oriented Architecture
Components developed using Microsoft’s COM provide a way by which two objects in different object spaces or networks, could talk together by calling each other’s methods. This excellent technology forces the operating system to see applications as objects.
COM forces the OS to act as a central registry for objects. The OS takes the responsibility of creating objects when they are required, deleteing them when they are not, and handling communications between them, be it in the same or different processes or machines. One major advantage of this mechanism is versioning. If the COM object ever changes to a new version, the applications that use that object need not be recompiled.
The wonderful thing about COM components is that they are never linked to any application. The only thing that an application may know about a COM object is what functions it may or may not support. In fact, the object model is so flexible that applications can query the COM object at run-time as to what functionality it provides.
Garbage Collection is one other major advantage to using COM. When there are no outstanding references (a.k.a. pointers) to an object, the COM object destroys itself.
COM supports Marshalling. Distributed Computing purists will attest to the fact that marshalling is the process of packaging and transmitting data between different address spaces, automatically resolving pointer problems, preserving the data’s original form and integrity. Even though COM objects reside in separate processes or address spaces or even different machines, the operating system takes care of marshalling the call and calling objects running in a different application (or address space) on a different machine.
Over and above all this, COM is a binary standard. A fully compliant COM object can be written in any language that can produce binary compatible code. So you can write ‘em using C, C++, Java, J++ or Visual Basic. All of the Windows NT shell has been written using COM.
© Copyright 1997-2000 Gopalan Suresh Raj. Reproduced with Permission
Mail a question to the author!!
As part of the IDevResource commitment to Open Publishing, all of our authors are available to answer all of your trickiest questions at Author Central. For information about the authors, or to mail a question, visit them at Author Central.
Did you like this article?
If you liked this article, tell us about it. You can email your remarks to us at [email protected]
Have your say about the article. You can make your point about the article by mailing [email protected] (If you haven't allready joined, you can join by going to onelist.com/community/dev-com).
Want to read more articles by this author?
Try these:
Byte size articles:
COM Threading Models By Gopalan Suresh Raj, 070200
Gopalan explains the differences in COM and Win 32 threading models.
Go To Article.
ActiveX & COM By Gopalan Suresh Raj, 270100
Gopalan explains the basics of ActiveX / COM as a truly distributed Object Oriented Architecture.
Go To Article.
Full size articles:
COM Channel:
Java COM Integration - Use Visual J++ to implement COM Objects By Gopalan Suresh Raj.
Go To Article.
Developing an MSMQ Server Application using VJ++ By Gopalan Suresh Raj.
Go To Article.
Developing an MSMQ Client using VJ++ By Gopalan Suresh Raj.
Go To Article.
Coding a DCOM Server Component from IDL By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: February 10th 2000
Level of Difficulty: Advanced
Subjects Covered: IDL, DCOM, J++
Pre-required Reading: Component Object Model
Coding a DCOM Client By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: February 10th 2000
Level of Difficulty: Advanced
Subjects Covered: IDL, DCOM, J++
Pre-required Reading: Component Object Model, Coding a DCOM Server Component from IDL
Microsoft Transaction Server By Gopalan Suresh Raj.
Gopalans introductory article on Microsoft Transaction Server intorduces the basics to MTS, and leads in to the example articles included in the series.
Author: Gopalan Suresh Raj
Date Submitted: Jan 26 2000
Level of Difficulty: Beginners / Intermediate
Subjects Covered: MTS
Pre-required Reading: None
Developing a Simple MTS Server Component By Gopalan Suresh Raj.
Part 1 of a two part example.
Author: Gopalan Suresh Raj
Date Submitted: Jan 26 2000
Level of Difficulty: Beginners / Intermediate
Subjects Covered: MTS
Pre-required Reading: Microsoft Transaction Server
Developing a Simple MTS Client Application By Gopalan Suresh Raj.
Part 2 of a two part example.
Author: Gopalan Suresh Raj
Date Submitted: Jan 26 2000
Level of Difficulty: Beginners / Intermediate
Subjects Covered: MTS
Pre-required Reading: Microsoft Transaction Server, Developing a Simple MTS Server Component
Developing The Bank Account IDL By Gopalan Suresh Raj.
A Three-Tier Architecture for a Bank Checking Account - Developing The Bank Account IDL is part 1 of a 3 part example.
Author: Gopalan Suresh Raj
Date Submitted: Jan 26 2000
Level of Difficulty: Beginners / Intermediate
Subjects Covered: MTS
Pre-required Reading: Microsoft Transaction Server
MTS Server Component By Gopalan Suresh Raj.
A Three-Tier Architecture for a Bank Checking Account - MTS Server Component is the second part of this three part example.
Author: Gopalan Suresh Raj
Date Submitted: Jan 26 2000
Level of Difficulty: Beginners / Intermediate
Subjects Covered: MTS
Pre-required Reading: Microsoft Transaction Server, Developing The Bank Account IDL
MTS Client By Gopalan Suresh Raj.
A Three-Tier Architecture for a Bank Checking Account - MTS Server Component is the third part of this three part example.
Author: Gopalan Suresh Raj
Date Submitted: Jan 26 2000
Level of Difficulty: Beginners / Intermediate
Subjects Covered: MTS
Pre-required Reading: Microsoft Transaction Server, Developing The Bank Account IDL, MTS Server Component
Java Channel:
Enterprise Java Beans By Gopalan Suresh Raj.
In this introduction to Enterprise Java Beans, Gopalan covers the bases then goes on to demonstrate how to build server side business object components. This article is the introduction to Gopalan's series of Enterprise JavaBeans articles. (This series of articles is © Copyright 1997-2000 Gopalan Suresh Raj. Reproduced with Permission)
Author: Gopalan Suresh Raj
Date Submitted: January 6th 2000
Level of Difficulty: Advanced
Subjects Covered: Enterprise JavaBeans, EJB Server, EJB Architecture, Java Naming and Directory Interface, Java Transaction Service.
Pre-required Reading: None
Enterprise Java Beans Series - Components at the Server By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Server side components, CORBA
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Model By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Enterprise JavaBeans, EJB Server, EJB Containers, EJB Clients.
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Naming Services and JNDI By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Naming Services, Java Naming Directory Interface
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Transactions and JTS By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Java Transaction Service, Two-phase commits
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Lifecycle By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: EJB server provider, EJB container provider, EJB developer, EJB deployer, Application developer.
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Servers By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Server Infrastructure
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Containers By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: EJB Containers, EJB Servers
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Components By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: EJB Object, Home Object, Remote Object
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Session Beans By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Stateful Session Beans, Stateless Session Beans
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - EJB Entity Beans By Gopalan Suresh Raj.
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Container-Managed Persistence, Bean-Managed Persistence
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - Writing an Entity Bean By Gopalan Suresh Raj.
Part 1 of a four part series: A four tier bank account example
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Developing Entity Beans, Home & Remote Interfaces, Data Sources.
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - Writing a Session Bean By Gopalan Suresh Raj.
Part 2 of a four part series: A four tier bank account example
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Developing Session Beans, Home & Remote Interfaces, Deployment Descriptors.
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - Writing an EJB Client By Gopalan Suresh Raj.
Part 3 of a four part series: A four tier bank account example
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: EJB Clients.
Pre-required Reading: Enterprise JavaBeans
Enterprise Java Beans Series - Writing an EJB Servlet Client By Gopalan Suresh Raj.
Part 4 of a four part series: A four tier bank account example
Author: Gopalan Suresh Raj
Date Submitted: January 11th 2000
Level of Difficulty: Advanced
Subjects Covered: Servlet Clients.
Pre-required Reading: Enterprise JavaBeans
Further Reading:
- Microsoft Transaction Server By Richard Grimes, introduces Microsoft Transaction Server
- What COM is all about By Richard Grimes, an introductory article to COM, covering all basics including OLE, Activex and DLL's.
- String Binding Moniker By Frank Rem, shows how a SB Moniker resolves a connection with a DCE RP server running on Linux using a VB client.
- Inside COM Monikers By Davide Marcato, on COMdeveloper.com. monikers are still one of the most clever but at the same time most misunderstood idioms in the COM universe. Davide explains them.
More ByteSize articles:
'ILoveYou' By Richard Grimes, 200500
Richard Grimes discusses the release of the Microsoft patch for the 'ILoveYou' virus.
Go To Article.
COM+ 2.0 - First Announcement of Microsoft's New Technology By Richard Grimes, 100500
Richard Grimes reports on the recent news about COM+ 2.
Go To Article.
How to use DDX with WTL? By Girish Bharadwaj, 270300
Go To Article.
ATL Server By Richard Grimes, 220200
Richard's report from European Devweek 2000, and VCDC Bonn 2000 gives an insight into the new ATL Server technology.
Go To Article.
COM Threading Models By Gopalan Suresh Raj, 070200
Gopalan explains the differences in COM and Win 32 threading models.
Go To Article.
ActiveX & COM By Gopalan Suresh Raj, 270100
Gopalan explains the basics of ActiveX / COM as a truly distributed Object Oriented Architecture.
Go To Article.
Type Library Info, XML and a bit of XSL for fun! by Richard Anderson 121199
This article assumes you understand COM, Type Libraries, XML and enough about VB that you can either use the code as a starting point, or, translate it into another language.
Go To Article.
This article can be downloaded: Zip File (76kb).
COM and Apartments By Richard Grimes, 070100
A discussion on the creation and use of "Apartments" in Win32.
Go To Article.
What is WTL? By Richard Grimes, 070100
Richard gives a basic introduction to WTL.
Go To Article.
An Introduction to Interface Programming By Richard Grimes, 070100
Richard describes the background to interfaces.
Go To Article.
Some links on COM:
- https://www.microsoft.com/com/ Microsoft's COM pages
- COMdeveloper.comVisit the COMdeveloper Web site for news items, articles, master classes, book reviews, a listserv, competitions, and a newsletter on COM, DCOM, ATL, and COM+ for VB, Java, and C++ developers.
- Chappell & Associates Visit the site hosted by Chappell & Associates to learn more about their seminars, videos, and articles on distributed computing, objects, and more.
- Codemarine, Inc. Visit the CodeMarine Web site to find information about in-depth COM training, mentoring, and consulting offerings.
- DevelopMentor Visit the CodeMarine Web site to find information about in-depth COM training, mentoring, and consulting offerings.
Author Bio:
Author: Gopalan Suresh Raj
Gopalan Suresh Raj is a Software Architect, Developer and an active Author.
He is contributing author to a couple of books "Enterprise JavaComputing-Applications and Architecture"(Cambridge University Press, June '99) and "TheAwesome Power of JavaBeans"(Manning, July'98).
His expertise spans enterprise component architectures and distributed object computing. Visit him at his Web Cornucopia site (https://www.execpc.com/~gopalan)or mail him at [email protected].
Go to Gopalan's pages in Author Central.
Contribute to IDR:
To contribute an article to IDR, a click here.
|