5.2 COM

The Component Object Model (COM) grew out of Microsoft’s efforts to make the various parts of its Office productivity suite work together. The first version of the Object Linking and Embedding (OLE) technology allowed one application, such as Microsoft Word, to embed the content of another, such as Microsoft Excel, thus realizing compound documents. The second version of OLE added things like in-place editing and drag-and-drop. Whereas OLE 1.0 was a self-contained technology, Microsoft opted to separate the object and component models from OLE when building OLE 2.0, as it realized that the technology built for OLE could be useful in other contexts as well. Tony Williams, one of the architects of COM at Microsoft, puts it thus: “We decided to bite the bullet and make a much more formalized model of what is an object, what does it mean to have interfaces, what does it mean to negotiate over them—and [...] that became COM” (Microsoft 2006). While COM and OLE were both built by the same team, Microsoft kept the distinction between them very clear. OLE 2.0 was layered on top of COM, and consisted of a large number of interfaces and a small runtime system.

COM has evolved considerably since then. The COM runtime system ships with all modern Windows versions, and a large number of Windows services are accessed using COM interfaces. COM has also proven popular as a vehicle for realizing component technology for third-party developers. The rich ecosystem that has grown up around ActiveX components, which are based on COM, is a case in point (Szyperski et al. 2002:26). COM may be used to realize distributed computing through Distributed COM (DCOM), and enterprise services (such as the ones enumerated in section 1.7) through COM+ (Bukovics 2006).

COM has had a profound influence on the industry. While the original runtime system powers a large number of applications and services on the Windows platform, it is the ideas that underlie COM that have had the greatest impact. Many component models are more or less faithful replicas of COM. Despite the Windows-centric nature of COM,1 the technology is widely available on other platforms, reimplemented by vendors other than Microsoft. Mozilla’s products, such as the Firefox web browser, use a COM-compatible technology known as XPCOM (“XP” stands for “cross-platform”) (Turner and Oeschger 2003).2 Sun’s OpenOffice.org productivity suite uses the COM-inspired UNO component model to enable OLE-like features, such as embedding, in-place activation and scripting using the BASIC language (Sun Microsystems 2007).

In the embedded realm, many component models are heavily influenced by COM. Philips’s and Samsung’s Universal Home API (UHAPI), for electronics appliances in the home, borrows heavily from COM with its uhCOM technology. The Symbian operating system for mobile handsets uses a COM-inspired component model called ECom (Symbian Foundation 2008). ABB uses COM-like technology for their programmable controllers to increase the modularity of their codebase (Lüders et al. 2005).

Footnotes

  1. There have been attempts to port COM to other platforms, notably Unix and the Apple Macintosh. Such efforts have gained little traction, though (Szyperski et al. 2002:330).
  2. XPCOM is interesting in that components are written in C++, user interfaces described in an XML-based language and the glue between them written in the scripting language JavaScript (again, exemplifying the division between component assemblers and component builders).