Object-Oriented Programming using SOM

Object-oriented programming is a programming paradigm based on objects, which are programming constructs designed to reflect items in the real world. An object consists of both the data necessary to describe a real-world item, and the functions necessary to describe the behavior of the item. This is in contrast to the structured programming model, which focuses on the things that can be done to the data (the functions), and which treats the data only as something to be acted on. Objects bind together the data that describes an item and the functions that act on the data.

The basic unit of organization in object-oriented programming is the object, which is a data structure that consists of data and functions. The data is called the object's state. The functions that define the object's behavior are called methods. Objects are instances, or instantiations, of a class. A class is a description of an object. It defines the data that represents the object's state, and the methods that the object supports.

OS/2 2.0 includes a language-neutral object-oriented programming mechanism called the System Object Model. SOM is specifically designed to support the new, object-oriented paradigm, and to be usable with both procedural (non-object-oriented) languages and object-oriented languages. (This release of SOM only supports the C language.) SOM is not a language–it is a system for defining, manipulating, and releasing class libraries. SOM is used to define classes and methods, while allowing the developer to choose a language for implementing these methods. Most programmers will therefore be able to use SOM quickly without having to learn a new language syntax. SOM objects are language-neutral. They can be defined in one programming language and used by applications or objects written in another programming language.

SOM consists of a run-time library and a set of utility programs that support building, externalizing, and manipulating software objects.