IBM System Object Model

Last updated
IBM SOMobjects
Developer(s) IBM
Stable release
3.0 / December 1996
Operating system OS/2, Windows, AIX, Classic Mac OS, Copland, OS/390, NonStop OS, OS/400
Type object-oriented shared library system

In computing, the System Object Model (SOM) is an object-oriented shared library system developed by IBM. DSOM, a distributed version based on CORBA, allowed objects on different computers to communicate.

Contents

SOM defines an interface between programs, or between libraries and programs, so that an object's interface is separated from its implementation. SOM allows classes of objects to be defined in one programming language and used in another, and it allows libraries of such classes to be updated without requiring client code to be recompiled.

A SOM library consists of a set of classes, methods, static functions, and data members. Programs that use a SOM library can create objects of the types defined in the library, use the methods defined for an object type, and derive subclasses from SOM classes, even if the language of the program accessing the SOM library does not support class typing. A SOM library and the programs that use objects and methods of that library need not be written in the same programming language. SOM also minimizes the impact of revisions to libraries. If a SOM library is changed to add new classes or methods, or to change the internal implementation of classes or methods, one can still run a program that uses that library without recompiling. This is not the case for all other C++ libraries, which in some cases require recompiling all programs that use them whenever the libraries are changed, known as the fragile binary interface problem.

SOM provides an application programming interface (API) that gives programs access to information about a SOM class or SOM object. Any SOM class inherits a set of virtual methods that can be used, for example, to find the class name of an object, or to determine whether a given method is available for an object.

Applications

SOM was intended to be used universally from IBM's mainframe computers right down to the desktop in OS/2, allowing programs to be written that would run on the desktop but use mainframes for processing and data storage. IBM produced versions of SOM/DSOM for OS/2, Microsoft Windows and various Unix flavours (notably IBM's own AIX). For some time after the formation of the AIM alliance, SOM/DSOM was also used by Apple Computer for similar purposes. It was most widely used in their OpenDoc framework, but saw limited use in other roles as well.

Perhaps the most widespread uses of SOM within IBM were in later versions of OS/2, which used it for most code, including the Workplace Shell. Object REXX for OS/2 is able to deal with SOM classes and objects including WPS. [1]

SOMobjects were not completely shut down by IBM. They were ported to OS/390, and are still available on this OS. One can read documentation on IBM website. [2] In 1996 Tandem Computers Inc. obtained SOMobjects technology. [3] Tandem was sold to Compaq, Compaq was sold to Hewlett-Packard. NonStop DOM and some other technologies eventually merged into NonStop CORBA, but current documentation of NonStop products does not contain signs of SOM technology still powering NonStop products.

Fading away

With the "death" of OS/2 in the mid-1990s, the raison d'être for SOM/DSOM largely disappeared; if users would not be running OS/2 on the desktop, there would be no universal object library anyway. In 1997, when Steve Jobs returned to Apple and ended many development efforts including Copland and OpenDoc, SOM was replaced with Objective-C [4] already being in use in OPENSTEP (to become Mac OS X later). SOM/DSOM development faded, and is no longer actively developed, although it continues to be included and used in OS/2-based systems such as ArcaOS. [5]

Despite effective death of OS/2 and OpenDoc, SOM could have yet another niche: Windows and cross-platform development. SOM 3.0 for WinNT was generally available in December 1996. The reasons for not advancing in these directions go beyond market adoption problems. They involve opportunities missed by IBM, [6] and destructive incompatible changes:

Alternative implementations

Two projects of open-source SOM implementations exist. One is Netlabs Object Model (NOM), which is technically the same, but binary incompatible. Another is somFree, which is a clean room design of IBM SOM, and binary compatible. [ citation needed ]

Comparison of support for compiled class libraries

Historically, SOM was compared to Microsoft's Component Object Model (COM) by IBM. However, from some points of view there is no place for COM at all. From the point of view of release to release transformations, COM is on procedural level, thus, the table 1 in RRBC article (Release-to-Release Binary Compatibility referenced earlier) does not contain COM column at all. Instead, SOM is being compared to:

Most information in this table is still applicable to modern versions (as of 2015), except Objective-C 2.0 getting so called non-fragile instance variables. Some solutions remained experimental: SGI Delta/C++ or Sun OBI. Most approaches based on one programming language were phased out or were never used actively in the same way. For instance, Netscape Plugin Application Programming Interface (NPAPI) browser plugins were written using Java API initially (LiveConnect), but Java Virtual Machine (JVM) was later excluded from the chain. It can be seen as Java replaced with Cross Platform Component Object Model (XPCOM). Common Lisp Object System (CLOS) and Smalltalk are not known as being chain links like Java in LiveConnect. Objective-C is also not known much in this role and not known to be marketed this way, but its runtime is one of the most friendly to similar use cases.

Generic C++ is still being used in Qt and the K Desktop Environment (KDE). Qt and KDE are notable for describing efforts it takes to maintain binary compatibility without special support in development tools. [10]

GObject only aimed to avoid dependence on C++ compiler, but RRBC issues are the same as in generic C++.

Without special runtime many other programming languages will have the same issues, e.g., Delphi, Ada. It can be illustrated by so-called unprecedented approach it took to produce Delphi 2006 binary compatible Delphi 2007 release: How to add a "published" property without breaking DCU compatibility Archived 2015-12-08 at the Wayback Machine

Objective-C is the most promising competitor to SOM (although not being actively marketed as multi-language platform), and SOM should preferably be compared to Objective-C as opposed to COM as it happened historically. With non-fragile instance variables in Objective-C 2.0 it is the best alternative amongst actively supported.

COM, XPCOM are being used actively, but they only manage interfaces, not implementations, and thus are not on the same level as SOM, GObject and Objective-C. Windows Runtime under closer look behaves much like COM. Its metadata description is based on .NET, but since WinRT does not contain special runtime to resolve RRBC issues, like in Objective-C or SOM, several restrictions had to be applied that limit WinRT on procedural level:

Type System (C++/CX)

A ref class that has a public constructor must be declared as sealed, to prevent further derivation.

Windows Runtime Components - Windows Runtime Components in a .NET World

Another restriction is that no generic public classes or interfaces can be exposed. Polymorphism isn’t available to WinRT types, and the closest you can come is implementing WinRT interfaces; you must declare as sealed any classes that are publicly exposed by your Windows Runtime Component.

Comparison to COM

SOM is similar in concept to COM. Both systems address the problem of producing a standard library format that can be called from more than one language. SOM can be considered more robust than COM. COM offers two methods of accessing methods onto an object, and an object can implement either one of them or both. The first one is dynamic and late binding (IDispatch), and is language-neutral similar to what is offered by SOM. The second, called a Custom Interface, is using a function table which can be built in C but is also directly compatible with the binary layout of the virtual table of C++ objects in Microsoft's C++ compiler. With compatible C++ compilers, Custom Interfaces can therefore be defined directly as pure virtual C++ classes. The resulting interface can then be called by languages that can call C functions through pointers. Custom Interfaces trade robustness for performance. Once an interface is published in a released product, it can not be changed, because client applications of this interface were compiled against a specific binary layout of this interface. This is an example of the fragile base class problem, which can lead to DLL hell, as a new version of a shared library is installed and all programs based on the older version can stop functioning properly. To prevent this problem, COM developers must remember to never change an interface once it is published, and new interfaces need to be defined if new methods or other changes are required.

SOM prevents these issues by providing only late binding, to allow the run-time linker to re-build the table on the fly. This way, changes to the underlying libraries are resolved when they are loaded into programs, although there is a performance cost.

SOM is also much more robust in terms of fully supporting a wide variety of OO languages. Whereas basic COM essentially defines a cut-down version of C++ to program to, SOM supports almost all common features and even some more esoteric ones. For instance SOM supports multiple inheritance, metaclasses and dynamic dispatching. Some of these features are not found in most languages, which had led most SOM/COM-like systems to be simpler at the cost of supporting fewer languages. The full flexibility of multi-language support was important to IBM, however, as they had a major effort underway to support both Smalltalk (single inheritance and dynamic dispatch) with C++ (multiple inheritance and fixed dispatch).

The most notable difference between SOM and COM is support for inheritance—COM does not have any. It might seem odd that Microsoft produced an object library system that could not support one of the most fundamental concepts of OO programming; the main reason for this is that it is difficult to know where a base class exists in a system where libraries are loaded in a potentially random order. COM demands that the programmer specify the exact base class at compile time, making it impossible to insert other derived classes in the middle (at least in other COM libraries).

SOM instead uses a simple algorithm, looking for potential base classes by following the inheritance tree and stopping at the first one that matches; this is the basic idea behind inheritance in most cases. The downside to this approach is that it is possible that new versions of this base class may no longer work even if the API remains the same. This possibility exists in any program, not only those using a shared library, but a problem can become very difficult to track down if it exists in someone else's code. In SOM, the only solution is extensive testing of new versions of libraries, which is not always easy.

While SOM and COM were contrapositioned by IBM, they were not mutually exclusive. In 1995 Novell contributed ComponentGlue [11] technology to OpenDoc for Windows. This technology provided different means to integrate between COM- and SOM-based components. In particular, SOM objects can be made available to OLE2 applications by either late binding bridge (based on IDispatch) or COM interfaces having higher performance. In essence, SOM classes are implementing COM interfaces this way.

The flexibility offered by SOM was considered worth the trouble by almost all [ citation needed ], but similar systems, such as Sun Microsystems' Distributed Objects Everywhere, also supported full inheritance. NeXT's Portable Distributed Objects avoided these issues via a strong versioning system, allowing library authors to ship new versions along with the old, thereby guaranteeing backward compatibility for the small cost of disk space.

See also

Related Research Articles

Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit features from more than one parent object or parent class. It is distinct from single inheritance, where an object or class may only inherit from one particular object or class.

Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS.

In computing, DLL Hell is a term for the complications that arise when one works with dynamic-link libraries (DLLs) used with Microsoft Windows operating systems, particularly legacy 16-bit editions, which all run in a single memory space.

Portable Distributed Objects (PDO) is an application programming interface (API) for creating object-oriented code that can be executed remotely on a network of computers. It was created by NeXT Computer, Inc. using their OpenStep system, whose use of Objective-C made the package very easy to write. It was characterized by its very light weight and high speed in comparison to similar systems such as CORBA.

<span class="mw-page-title-main">Windows API</span> Microsofts core set of application programming interfaces on Windows

The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations that are often referred to by their own names. Almost all Windows programs interact with the Windows API. On the Windows NT line of operating systems, a small number use the Native API.

<span class="mw-page-title-main">Library (computing)</span> Collection of non-volatile resources used by computer programs

In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications. In IBM's OS/360 and its successors they are referred to as partitioned data sets.

An object-oriented operating system is an operating system that is designed, structured, and operated using object-oriented programming principles.

The Visual Component Library (VCL) is a visual component-based object-oriented framework for developing the user interface of Microsoft Windows applications. It is written in Object Pascal.

<span class="mw-page-title-main">Delphi (software)</span> General-purpose programming language and a software product

Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop, mobile, web, and console software, currently developed and maintained by Embarcadero Technologies.

Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods.

<span class="mw-page-title-main">Free Pascal</span> Free compiler and IDE for Pascal and ObjectPascal

Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal and Object Pascal. It is free software released under the GNU General Public License, with exception clauses that allow static linking against its runtime libraries and packages for any purpose in combination with any other software license.

In compiler construction, name mangling is a technique used to solve various problems caused by the need to resolve unique names for programming entities in many modern programming languages.

The fragile binary interface problem or FBI is a shortcoming of certain object-oriented programming language compilers, in which internal changes to an underlying class library can cause descendant libraries or programs to cease working. It is an example of software brittleness.

<span class="mw-page-title-main">XBase++</span>

Xbase++ is an object oriented programming language which has multiple inheritance and polymorphism. It is based on the XBase language dialect and conventions. It is 100% Clipper compatible language supporting multiple inheritance, polymorphism, object oriented programming. It supports the xBase data types, including Codeblocks. With Xbase++ it is possible to generate applications for Windows NT, 95, 98, Me, 2000, XP, VISTA and Windows 7, 8, 10.

A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. An FFI is often used in contexts where calls are made into binary dynamic-link library.

Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication (IPC) object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, Browser Helper Object, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime.

Windows Runtime (WinRT) is a platform-agnostic component and application architecture first introduced in Windows 8 and Windows Server 2012 in 2012. It is implemented in C++ and officially supports development in C++, Rust/WinRT, Python/WinRT, JavaScript-TypeScript, and the managed code languages C# and Visual Basic .NET (VB.NET).

<span class="mw-page-title-main">Mono (software)</span> Computer software project

Mono is a free and open-source .NET Framework-compatible software framework. Originally by Ximian, it was later acquired by Novell, and is now being led by Xamarin, a subsidiary of Microsoft and the .NET Foundation. Mono can be run on many software systems.

Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTSTEP operating system. Due to Apple macOS’s direct lineage from NeXTSTEP, Objective-C was the standard programming language used, supported, and promoted by Apple for developing macOS and iOS applications until the introduction of the Swift programming language in 2014. Thereafter, its usage has been consistently declining among developers and it has often been described as a "dying" language.

References

  1. SOM and Object REXX by Dr. Willis Boughton (August 2004)
  2. SOMobjects for OS/390 documentation
  3. "Tandem Leverages IBM's SOMobjects Technology for Distributed Object Computing". Archived from the original on 2016-03-05. Retrieved 2015-05-02.
  4. Ira R. Forman and Scott Danforth (1999). Putting Metaclasses to Work. Addison-Wesley. ISBN   0-201-43305-2.
    Chapter 11 "Release-to-Release Binary Compatibility", page 246
    An article with identical name and similar contents of the same author can be found on the Web: Release-to-Release Binary Compatibility Archived 2015-10-03 at the Wayback Machine
  5. "List of ArcaOS 5.0 WPS Classes" . Retrieved 2020-09-03.
  6. Lost in the Garden by Roger Sessions (August 1996)
  7. Just a little SOM thing for Linux developers by Esther Schindler (February 2008)
  8. Steven J. Vaughan-Nichols (February 8, 2008). "Reviving OS/2's best in the Linux desktop". Archived from the original on 2010-04-17.
  9. The OS/2 petition, second round (2007–2010)
  10. Binary Compatibility Issues With C++
  11. ComponentGlue(tm) Provides Full Interoperability with OLE, OCX Controls