[Library] [Contents] [Revisions] [Prev Topic] [Next Topic] [Search] [Search Results] [Prev Topic Match] [Next Topic Match] [Notes] [List Notes] [Print] [Download] [Help]

2.7.3 SOM

OpenDoc uses the System Object Model (SOM) initially released in OS/2 2.0 in April 1992. SOM is a proven, multi-platform, and language-neutral object model. It is compliant with the CORBA 1.2 specification.

SOM was originally introduced as part of OS/2 to provide a stable object model for the Workplace Shell. The problem by introducing an object-oriented user interface into an operating system platform was the release-to-release binary compatibility (RRBC). That means that parts could be replaced without having side effects to applications using these parts. The Workplace Shell was implemented as a class library that could be used by many other application developers inheriting the functionality provided by the Workplace Shell. What would happen if the Workplace Shell would be upgraded? Using pure C++ would mean that none of these applications would run without recompilation and redistribution. The Workplace Shell has solved this problem by using SOM. If the Workplace Shell classes change all Workplace Shell derived classes and applications are inheriting the new functions on the fly. It is due to the magic of SOM providing release-to-release binary compatibility (RRBC).

A component technology such as OpenDoc is facing exactly the same problems. The reason is that there is no binary consistence of changed objects and classes. That means, if a C++ class is updated, all classes using the changed class or being derived from it must be recompiled. Because of the different object layouts produced by different compilers, it is also not possible to link object codes produced with a compiler A with object codes produced by a compiler B. A C++ programmer, for example, cannot easily use classes developed in Smalltalk, nor can a Smalltalk programmer make effective use of C++ classes. Object-oriented language and toolkit boundaries become barriers to interoperability. A component model has to solve this problem, which it can do this in different ways. One way to avoid this problem is to not allow inheritance at all. That is the way COM (Common Object Model), the underlaying object model of OLE2, is working.

SOM as the underlying object model of OpenDoc is the IBM solution to that problem. SOM provides a strong state-of-the art object behavior by using the object model of CORBA. SOM is supporting multiple inheritance, offers strong encapsulation for objects and polymorphism. One way to solve the RRBC problem for SOM was to make classes itself to living objects, similar to what Smalltalk is doing. This provides a great flexibility. Classes can be created, changed, and updated dynamically at run time. The same implementation of classes can behave in different ways by using metaclasses, that are classes the class objects are derived from.

This binary compatibility enables SOM objects to be implemented and used in a language-independent way. Classes are defined in this CORBA-compliant IDL. SOM has added some implementation specific constructs such as metafiles. The SOM Compiler then generates from this IDL definition header files and skeletons for the language the developer prefers to implement the functions in. This may be C, C++, COBOL, or REXX for example. Because SOM provides the object behavior as inheritance, classes can be implemented with non object-oriented languages producing fully fledged class libraries.

In addition to that, SOM can produce usage bindings for other languages. That means a class implemented in REXX can be derived from a class implemented in C and can be used from a COBOL or Smalltalk program.

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 same object model can be used across the entire spectrum of small and large operating systems covering DOS/Windows, OS/2, AIX, OS/400 and MVS. Other platform support for HP-UX, Apple-Mac and SUN is planned for the near future.



[Prev Topic] [Next Topic] © Copyright IBM Corp. 1996

IBM BookManager® BookServer Copyright 1989, 1999 IBM Corporation. All rights reserved.