OpenDoc vs. OLE 2.0. Superior by Design. A Developer's View
By IBM Personal Software Products (January, 1994)
Compound Document Architectures - OpenDoc and OLE 2.0
Compound document architectures are an important new type of software platform. IBM is providing the analysis in this white paper to help put the major compound document architectures — OpenDoc™ and Object Linking and Embedding 2.0 (OLE 2.0) — into perspective.
OpenDoc is one of four technologies to be licensed by the Component Integration Laboratories (CILabs) as announced on September 17, 1993. CILab's initial supporters include Apple®, IBM®, Novell®, Oracle®, SunSoft®, Taligent®, WordPerfect®, and Xerox®, with many, many others expected to join, ensuring the success and acceptance of the CILab technologies in the marketplace. Together, the four initial technologies and others adopted by CILabs in the future will provide a dramatically higher level of interoperability for applications on all major desktop systems.
CILabs initially plans to license these four key technologies to the industry:
- OpenDoc software architecture for Windows™, OS/2®, Macintosh® and UNIX™ to enable embedding of features from different applications into a single working document.
- Bento® for the storage and interchange of multimedia information
- Open Scripting Architecture (OSA) for the coexistence of multiple scripting systems.
- IBM's System Object Model™ (SOM) architecture, a highly efficient platform and language-independent run-time mechanism for dynamic object linking.
CILab plans to make source code available to the industry for these technologies, and its sponsors plan to support the technologies across multiple platforms. Initial target platforms include Microsoft Windows, Macintosh, and OS/2, with plans to support UNIX systems.
For more information on CILabs, OpenDoc, SOM, the Open Scripting Architecture, and Bento, please contact CILabs at:
- Component Integration Laboratories
- 688 Fourth Avenue
- San Francisco, CA 94118
- (415) 750-8352
- (408) 974-9710 FAX
- Internet: email@example.com
OpenDoc vs. OLE
OpenDoc -- along with Bento, Open Scripting Architecture (OSA), and SOM -- provides a superior and complementary compound document architecture to OLE 2.0. This document outlines OpenDoc's strengths over OLE 2.0 in the following areas:
- Object Programming Model
- Development Effort Required
- Scalability and Extensibility
- Scripting and Automation
- Networking Capability
- Activation Model
- Content Shape Support
- Storage Subsystem
- Object Linking
- Openness/Standards Support
- and Certification Process
OpenDoc also is designed to interoperate with all other major document architectures and object frameworks, including OLE 2.0, the Taligent document framework, and other emerging environments such as ScriptX and Fresco. This design lets applications in other environments interoperate through OpenDoc. Also, OpenDoc interoperability can help to reduce some of the functional limitations of applications developed for less sophisticated environments such as OLE 2.0.
Object Programming Model: OpenDoc uses the Systems Object Model (SOM) initially released in OS/2 2.0 in April 1992. SOM is proven, multi-platformed, and language-neutral object model. It is compliant with the Common Object Request Broker Architecture (CORBA) 1.1 specification endorsed by the Object Management Group (OMG).
OLE 2.0 is based on Microsoft's Common Object Model (COM) which is new, proprietary to Microsoft (no source code available) and is not CORBA-compliant. Microsoft announced it will support DEC's ObjectBroker which will use CORBA for distribution, but the object programming model is still COM which is proprietary to Microsoft and not CORBA-compliant.
One of the greatest benefits of the SOM technology is the single programming model. SOM scales very gracefully from local to distributed objects, utilizing the Distributed SOM (DSOM) framework included in the SOMObjects™ Developers Toolkit. With the SOM/DSOM model the syntax is the same across the entire spectrum of small and large and local and distributed objects.
Microsoft claims that COM provides a single programming model for distributed and local objects and that distributed COM behaves the same as local COM, however, they have not demonstrated this capability. On closer examination, COM actually proposes two programming models; class libraries, for small functions, and the COM/Aggregation model for larger functions. The two models are very different and require flexibility limiting design decisions.
Development Effort Required: OpenDoc has been designed to be easy to adopt. For instance, to write a typical application (or "part handler" in OpenDoc terminology) that supports:
- Native Object Model Support
- Container for Parts
- and Edit-in-Place
would require a developer to provide one interface, OpenDoc XMPPart, and write 50 functions.
OLE 2.0, on the other hand, has complex interfaces that require a programmer to understand low-level details about the OLE implementation. For example, to write an application with similar function in OLE, a developer would have to support the following interfaces and implement the following number of functions within each interface using OLE 2.0.2
|Interfaces = 13||Functions = 126|
Scalability, Extensibility: Scalability and extensibility are closely related because scaling from a simple compound document handler to a complex compound document application is easy with OpenDoc. You can just borrow the function of any set of standard interfaces, or object classes, simply by inheriting all the function of that class and modifying it to your particular needs. By definition you automatically get, or inherit, all of the existing interfaces and functions, and then can extend those functions to meet the application's unique requirements.
OLE 2.0 does not support the concept of inheritance. In order to borrow the functions of a set of interfaces you must claim you want to aggregate from that interface set, or class, and then specifically define each and every interface you wish to include (you don't automatically inherit each interface, you must explicitly copy each of them). Then you customize and extend the aggregated model to your particular application's needs. This model, which Microsoft refers to as aggregation, is referred to by some application developers as aggravation.
Scripting and Automation: OpenDoc has an Open Scripting Architecture (OSA) which means that vendors can port their own scripting languages to OpenDoc and that users have a choice of multiple scripting languages, which can coexist.
OpenDoc has event suites and a registry for them. Event suites define standard operations for different types of applications. For example, there is a set of standard operations for spreadsheets such as "give me this block of cells" or "perform a recalc" that will work in a given document regardless of what OpenDoc-enabled application is performing the spreadsheet function. Through the commonality of suites as a translator between applications, any two OpenDoc applications that are enabled for a suite can communicate. The registry allows the application to register what application suites it is enabled to perform.
OLE has no standard suites of events. Using the example above, if an application that needed data from a particular spreadsheet would need to know how that particular spreadsheet understood "give me this block of cells". For a different spreadsheet the application would communicate "give me this block of cells" in a different way. The application must specifically support communications with other applications on an application by application basis. In addition to creating application to application communication compatibility issues, the lack of application suites may pose issues when distributing documents to other users who may be using different applications or even different versions of the same application.
OpenDoc also has recordable macros whereas OLE has no recording Application Programming Interface (API). Recordable macros allow an application to record a user's actions and then save them to a script for later use. OpenDoc even allows the recording of macros across multiple applications and allows the recording to be stored in the user's preferred scripting language, which is an extremely powerful feature.
Networking Capability: OpenDoc is designed to provide a fully cross-platform networked compound document capability. CILabs supporters intend to network OpenDoc across OS/2, Windows, Macintosh, and UNIX, all through the use of SOM/CORBA technologies. CILab plans to provide system vendors and developers with source code for OpenDoc, Bento, OSA, and SOM to port to their platform, and system vendors and developers can implement a variety of CORBA-compliant request brokers to communicate across the network, including IBM's Distributed CORBA technology. IBM's implementation of distributed CORBA for OS/2, AIX®, and soon for Windows is Distributed SOM, or DSOM which is CORBA 1.1-compliant.
COM and OLE source code is not available to the industry without a license from Microsoft giving Microsoft the ability to chose which platforms can implement COM and/or OLE. In the Microsoft/DEC announcement in December 1993, Microsoft announced intentions to support only COM, not OLE, on several UNIX platforms, forcing those platforms to a server only status, because OLE is also required to support OLE compound documents on the client desktop. CILabs, on the other hand, has announced their intentions to openly license all four of their key technologies (OpenDoc, OSA, Bento, SOM) to anyone interested.
Activation Model: In OpenDoc you can directly edit an object, whereas in OLE you must activate the object before you can edit it. In OpenDoc, even if you have nested objects (an object embedded within an object within another object, for example) you can still directly edit the embedded object. However, in OLE, you must double click on the highest level object, then double click on the object within that object, and then double click on the object you want to edit.
In general, with OLE 2.0, you can activate only one object at a time meaning you must close any active/editable object in order to edit another object in that document. OpenDoc allows multiple active objects and edits.
Content Shape Support: OpenDoc supports irregularly shaped objects (i.e., wrapping text around a circle or triangle) while OLE 2.0 supports only rectangular content (i.e., text would wrap around the smallest rectangle that could surround the circle or triangle content). In addition, OpenDoc supports overlapped object content, but OLE 2.0 does not.
Storage Subsystem: OpenDoc is based on the Bento storage subsystem, which is published, commercially proven, and has been offered as a standard multimedia container to the Interactive Multimedia Association. Platform-independent source code for Bento is currently available from Apple Computer, and CILab plans to distribute and support the Bento source in the near future.
OLE is proprietary (owned by Microsoft) and is based on DocFiles, which store the multiple objects within a single file in a DOS FAT file system tree-like structure that is simplistic when dealing with complex or distributed objects. Microsoft has announced its intention to support a distributed object file system in a follow-on release to Windows NT™, code named CAIRO, scheduled to ship in 1995.
Object Linking: OpenDoc implements a robust object linking mechanism with persistent IDs assigned to objects in order to achieve more reliable linking for both local and remote objects.
OLE 2.0 has proven to have fragile links that can break when moving objects, even within the same document. For instance, OLE references an object via a moniker, which, typically, is a filename (pathname) concatenated with a series of item name parts. If the file is deleted, renamed or moved, then the link breaks.
Openness/Standards Support: Source code will be available to members via CILab for OpenDoc, OSA, Bento, and SOM. These technologies are designed to be portable and will be supported on multiple platforms. CILab is planning to license these technologies on a completely non-discriminatory basis. In addition, the underlying object model is based on SOM, which is CORBA-compliant.
Source code is not available for OLE, and Microsoft has the final say on all interface and implementation decisions making it proprietary. Microsoft has tried to appear softer on their proprietary stance by putting COM on top of DEC's ObjectBroker which uses CORBA to communicate. However, putting a proprietary interface (COM) on both ends of an open standard (CORBA) makes it a proprietary programming interface.
Certification Process: CILabs has announced they will have a formal certification process so that customers purchasing products from multiple vendors who support OpenDoc can have a high degree of confidence those applications or part handlers will work together. Customers or individual users using multiple OLE applications together will have to rely on each vendor's independent testing so customers will have to do their own integration testing.
In summary, it is clear that OpenDoc is superior and complementary in many ways to OLE as a compound document architecture. OpenDoc has significant advantages for users, developers, system integrators and MIS personnel, alike.
With the initial backing of Apple, IBM, Novell, Oracle, SunSoft, Taligent, WordPerfect, and Xerox, and with many, many others expected to follow, CILab technologies have gained the acceptance and critical mass of the ISV community. The ISVs will produce compelling applications based on CILab technologies to ensure acceptance by the industry as a whole.
In addition, OpenDoc will complement OLE through an interoperability solution that is currently being developed by the WordPerfect Corporation. And, as stated earlier, OpenDoc will interoperate with the robust, fully object-oriented Taligent frameworks that are being ported to OS/2, AIX, Workplace OS, and other key industry platforms.
- Source: IBM analysis of Microsoft Object Linking and Embedding (OLE) Today and Tomorrow - November 1993
- Source: Internal preliminary analysis and design using Microsoft Object Linking and Embedding - Programmer's Reference Guide (pre-release)
- PCWeek, December 6, 1993, page 1
- Microsoft Object Linking and Embedding - Programmer's Reference Guide, Creating Applications (pre-release), page 101, "Typically, an object's moniker will be a filename (pathname) concatenated with a series of item name parts."
Some of the information in this paper concerns future products, or future releases of current, commercially available products. Discussion of Windows and OLE are based on information in the public trade press, and is subject to change. IBM's and other vendors' future products and their performance, functions and availability are based upon IBM's or those vendors' current intent, and are subject to change.
Special Notices regarding IBM or other vendors' mentioned in this document:
References in this document to IBM's or other vendors' current and future products, programs, or services do not imply that IBM or those vendors' intends to make these generally available in all countries in which they operate.
IBM or other vendors may have patents or pending patent applications covering subject matter in this document. This document does not grant anyone a license to those patents, patent applications, or to any other IBM or other vendors' intellectual property.
Apple, Bento and Macintosh are registered trademarks and OpenDoc is a trademark of Apple Corporation
IBM and OS/2 are registered trademarks and SOMObjects and SOM are trademarks of IBM Corporation
Novell is a registered trademark of Novell, Inc.
UNIX is a trademark of X/Open Company Ltd.
Object Management Group and OMG are registered trademarks of Object Management Group, Inc.
Oracle is a registered trademark of Oracle Corporation
Taligent is a registered trademark of Taligent, Inc.
WordPerfect is a registered trademark of WordPerfect Corporation
Xerox is a registered trademark of Xerox Corporation
Microsoft is a registered trademark and Windows and Windows NT are trademarks of Microsoft Corporation
IBM Personal Software Products, 11400 Burnet Road, Austin TX 78758 USA
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation