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

The System Object Model (SOM) is an object-oriented shared library technology developed by IBM that supports defining an interface to an object so that its interface is separate from its implementation.

Contents

DSOM, a distributed variant based on CORBA, allowed objects on different computers to communicate.

A SOM library can be updated without requiring client code to be rebuilt. If a library is changed to add new classes or methods, or to change the internal implementation of classes or methods, a consuming program can still use it without being rebuilt. In this way, SOM addresses the fragile binary interface problem that affects other library technology such as C++.

SOM allows classes to be defined in one programming language and used in another. A client can create and use objects from the exposed classes and derive subclasses from the exposed classes even if the client language does not support class typing.

SOM provides an application programming interface (API) that provides access to library metadata. Each object exposes methods that provide the class name and whether the object implements a particular method, for example.

Applications

SOM was intended to be used universally in IBM's mainframe and desktop (OS/2) computers, allowing programs designed for the desktop to use a mainframe for processing and data storage. IBM produced versions of SOM/DSOM for OS/2, Microsoft Windows and various Unix flavors (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 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. [4]

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, [5] 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 to compiled class libraries

SOM can be compared compiled libraries: [9]

As of 2015, most of the information in the linked table is applicable to modern versions, 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 often compared to component object model (COM). Both support a library format that can be used from more than one language.

Some consider SOM to be more robust since it only supports a language-neutral calling mechanism that is similar to COM late binding. COM also supports early binding, a.k.a. custom interface, that is less safe although more performant. It allows a client to access an object via a function table that is compatible with C and therefore compatible with the binary layout of the virtual table of C++ objects (at least in Microsoft's C++ compiler). With a compatible C++ compiler, a custom interface can be defined as a pure virtual C++ class. The interface can be called by any language that can call C functions via a pointer.

A risk of a custom interface is that an incompatibility can result in undefined behavior. In particular, if a version of the object is published with a modified custom interface, a client may crash. This is an example of the fragile base class problem. To prevent the problem, a rule for COM development is that once published, a custom interface cannot be changed. To add or change the exposed features of an object, it can implement additional custom interfaces.

SOM avoid this issue by providing only late binding allowing 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.

SOM is more robust in terms of supporting object-oriented (OO) features. Whereas COM essentially defines a cut-down version of C++ to program to, SOM supports almost all common features. It also supports some less common features such as multiple inheritance, metaclasses and dynamic dispatching, which had led most SOM/COM-like systems to be simpler at the cost of supporting fewer languages. Multi-language support was important to IBM as they wanted to support both Smalltalk (single inheritance and dynamic dispatch) with C++ (multiple inheritance and fixed dispatch).

A notable difference is support for inheritance. COM does not. Although may think it odd that Microsoft produced an object library technology that could not support such a fundamental concept of OO programming; the main reason is that it is difficult to know where a base class exists in memory where libraries are loaded in a order unknown at design time. 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 an algorithm, looking for potential base classes by following the inheritance tree and stopping at the first one that matches. This is the 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 difficult to resolve if it exists in someone else's code. In SOM, the only solution is testing of new versions of libraries.

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 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.

Similar technologies, such as Distributed Objects Everywhere, also support full inheritance. 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 at the cost of disk space.

Related Research Articles

The Portable Operating System Interface is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system and user-level application programming interfaces (APIs), along with command line shells and utility interfaces, for software compatibility (portability) with variants of Unix and other operating systems. POSIX is also a trademark of the IEEE. POSIX is intended to be used by both application and system developers.

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

<span class="mw-page-title-main">GNUstep</span> Open source widget toolkit and application development tools

GNUstep is a free software implementation of the Cocoa Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project.

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

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

The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running.

<span class="mw-page-title-main">Library (computing)</span> Collection of resources used to develop a computer program

In computer science, a library is a collection of read-only resources that is leveraged during software development to implement a computer program.

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">WebObjects</span> Java web application server and framework originally developed by NeXT Software

WebObjects is a discontinued Java web application server and a server-based web application framework originally developed by NeXT Software, Inc.

<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.

<span class="mw-page-title-main">Workplace Shell</span>

The Workplace Shell (WPS) is an object-oriented desktop shell produced by IBM's Boca Raton development lab for OS/2 2.0. It is based on Common User Access and made a radical shift away from the Program Manager type interface that earlier versions of OS/2 shared with Windows 3.x or the application-oriented WIMP interface of the Apple Macintosh. The Workplace Shell was also used in OS/2 Warp 3 and Warp 4, and the OS/2-based operating systems eComStation and ArcaOS.

<span class="mw-page-title-main">Object REXX</span>

Object REXX is a high-level, general-purpose, interpreted, object-oriented (class-based) programming language.

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.

The Microsoft Windows operating system supports a form of shared libraries known as "dynamic-link libraries", which are code libraries that can be used by multiple processes while only one copy is loaded into memory. This article provides an overview of the core libraries that are included with every modern Windows installation, on top of which most Windows applications are built.

Binary-code compatibility is a property of a computer system, meaning that it can run the same executable code, typically machine code for a general-purpose computer central processing unit (CPU), that another computer system can run. Source-code compatibility, on the other hand, means that recompilation or interpretation is necessary before the program can be run on the compatible system.

Component Object Model (COM) is a binary-interface technology for software components from Microsoft that enables using objects in a language-neutral way between different programming languages, programming contexts, processes and machines.

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).

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.

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. "List of ArcaOS 5.0 WPS Classes" . Retrieved 2020-09-03.
  5. Lost in the Garden by Roger Sessions (August 1996)
  6. Just a little SOM thing for Linux developers by Esther Schindler (February 2008)
  7. Steven J. Vaughan-Nichols (February 8, 2008). "Reviving OS/2's best in the Linux desktop". Archived from the original on 2010-04-17.
  8. The OS/2 petition, second round (2007–2010)
  9. 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
  10. "Policies/Binary Compatibility Issues With C++ - KDE Community Wiki". community.kde.org.
  11. "Novell To Ship New OpenDoc(TM) Developer Release | Micro Focus". www.novell.com.