Visual C++ 6 Unleashed

Visual C++ 6 Unleashed

By MICKEY WILLIAMS and David Bennett

COM, OLE, and Active Technology History in a Nutshell

In 1991, Microsoft introduced a new specification called OLE 1.0. The acronym stood for Object Linking and Embedding. OLE 1.0 was basically a way of handling compound documents. A compound document is a way of storing data in multiple formats—such as text, graphics, video, and sound—in a single document. At the time, object-oriented was the new programming buzzword, and the OLE 1.0 specification was a move to a more object-oriented paradigm. Furthermore, OLE 1.0 was an effort to move toward a more document-centric approach, instead of an applications-centric approach. Unfortunately, OLE 1.0 was coldly received by software developers. Very few independent software vendors (ISVs) and corporations raced to embrace OLE 1.0 and OLE-enable their applications. This reluctance to deploy OLE 1.0 in applications was due mainly to the fact that OLE 1.0 was very complex and had a steep learning curve. Unlike today's COM, OLE 1.0 was not language-agnostic—applications had to be coded using C. Further, the original OLE specification failed to scale well, and it was inefficient when working with large data items. OLE 1.0 was based on the DDE protocol and required data to be copied into RAM, often at inappropriate times—editing a large bitmap stored in a disk file would often result in three copies of the file loaded into RAM or on disk simultaneously.

Fortunately, Microsoft continued to strive to improve OLE. In 1993, Microsoft released the OLE 2.0 specification, which encompassed more than just compound documents; it sported an entire architecture of object-based services that could be extended, customized, and enhanced. The foundation of this services architecture was the Component Object Model (COM). The services available through this architecture are as follows:

From a programmatic view, OLE is a series of services built on top of each other, as shown in Figure 24.1. These services form an architecture of interdependent building blocks built on the COM foundation.

24fig01.gif

Figure 24.1 The foundation of OLE is COM, with each successive service built on the technologies of the others.

The release of OLE had such an impact on standard ways of computing that it received two prestigious industry awards: a Technical Excellence award from PC Magazine and the MVP award for software innovation from PC/Computing. Adding to the success of OLE was a new and improved programming interface. Developers could now move to OLE-enabled applications much more easily. The OLE services incorporate many of the principles embodied in object-oriented programming: encapsulation, polymorphism, and an object-based architecture. Further adding to the success of OLE was the release in February 1993 of Visual C++ 1.0 with the Microsoft Foundation Class (MFC) Library version 2.0. MFC had wrapped the OLE API in a C++ class library, thus making it much easier for programmers to use the OLE services architecture.

Today, OLE is no longer the acronym for object linking and embedding. That term is now obsolete. Microsoft refers to it as simply OLE, pronounced "O-lay." Notice that there is no version number attached to OLE any more. Beginning with the technologies introduced with OLE 2.0, OLE is an extensible architecture, and it can be enhanced and extended without changing its basic foundation. A testimonial to this capability is OLE controls. OLE controls were not part of the original release of OLE 2.0. OLE controls were not added to the available OLE services until almost a year after the original release. In fact, objects created with OLE 1.0 still work and interact with modern OLE applications. However, their functionality is limited to the original 1.0 specification, so there is no need for versions.

In March 1996, Microsoft announced the ActiveX technologies, which included optimizations to COM and OLE that improved performance over the Internet and corporate intranets. The technology that made the largest splash was the new ActiveX control specification, which enabled controls used in a distributed environment to be smaller and easier to deploy. At the time, ActiveX was a grab bag of goodies that included:

Recently, Microsoft has renamed many of these technologies, and only ActiveX controls maintain ActiveX as part of their name. The term Active Technologies is now used to describe many things that were once grouped under the ActiveX umbrella.

The end result of all of this naming and renaming is that today COM, OLE, and ActiveX are terms that tend to mean different things to different people. As you can see in Figure 24.1, COM is the foundation of Microsoft's entire component object strategy. In general, this book will use the following terms:

Share ThisShare This

Informit Network