Jump to content

Introduction to SOM: Difference between revisions

From EDM2
Prokushev (talk | contribs)
No edit summary
 
Prokushev (talk | contribs)
No edit summary
Line 1: Line 1:
[http://en.wikipedia.org/wiki/System_Object_Model System Object Model] (SOM, SOMObjects) is a language neutral object model.
Introdution to SOM ([http://en.wikipedia.org/wiki/System_Object_Model System Object Model])


* [[SOM Core]]
by [[Prokushev]]
* [[Interface Definition Language]]
 
* [[SOM Compiler]]
System Object Model (SOM, SOMObjects) is a language neutral object model. Main advanage of SOM is possibility to implement classes in any language which supports  DLL  creation  or  usage.  Only  defined  thing  for  such  model is Interface.  Interface  described in terms of [[Interface Definition Language]] which can be translated to corresponding language binding. Classes represented in  binary  form  (In  language-specific  object  models  classes  exists only virtually until compilation. As example of such languages can be C++, Delphi, Pascal and other.). Actually, inherence implemented during runtime, like in true object-oriented languages like SmallTalk. Instanse of class represented by object. Actually, objects of same class shares same code. Code ca be stored either in DLL or in EXE. Most usable is DLL. DLL can contain one or more classes. DLL, in terms of SOM, named as classes library. Most of SOM functionality (except implementation of core logic) implemented with classes library.
 
By default with eComStation shiped lot of general classes library. One of then used every day and every minute, another - not so often. Later we will briefly look at all of them. Classes libraries includes:
 
* [[SOM Kernel]]
* [[Interface Repository Framework]]
* [[Metaclass Framework]]
* [[Event managment Framework]]
* [[Distributed SOM]]
* [[Sockets classes]]
* [[Replication Framework]]
* [[Presistent Framework]]
* [[Emitter Framework]]
* [[Collection Classes]]
* [[Workplace Shell Classes/XWorkplace Classes]]
* [[Multimedia Classes/CWMM Classes]]
 
Most notable classes (from users point of view) is Workplace Shell Classes. Desktop objects is SOM in work. Every day users uses SOM objects and most of them like it.
 
SOM objects can be manipulated easely. Using power of [[Object REXX]] and SOM users and programmers can do fantastic thing without any problems. WPS can be easely customized and manipulated with [[Object REXX]].
 
Another powerfull set of classes is [[OpenDoc Classes]]. Not part of eComStation system they allows to have higly integrated and user-friendly applications. If programmer will support OpenDoc then we can have lot of good application (sick! No application term in OpenDoc word!). No monsters like Open Office or Lotus Smart Suite. No applications like GIMP. Only components which allows to build documents with very-very impressive content by easy operations. It is possible. It is future of OS/2 and eComStation. We can make our word better. So, in future, we'll try to review [[OpenDoc classes]] closer.
 
Don't forgot about DSOM classes - implementation of CORBA specification. Not latest, but we can move forward and extend DSOM classes to support most (or all) features of current CORBA specification. It is also possible. SOM is open model. Most of classes and methods can be easely extended or replaced.
 
Don't forgot about other object models also. Most notable is [[XPCOM]]. Mozilla users uses XPCOM every time. It's DOM support. XPCOM can be wrapped by SOM classes and reused by OS/2 programmers. It's anothe topic for future reviews.
 
Remember Java. Java classes and objects can be accessed via SOM. Mixing portable and native solutions allow us to have fantastic things. Native interface and cross-platform background. And vise versa.
 
We can do all of it, we must do all of it. We must learn such things as SOM. Really, things not so hard as we think.
 
Lets create our first SOM class. It is easy.
 
Step 1. Write interface
Step 2. Create binding
Step 3. Write class implementation
Step 4. Use class
 
Nothing hard. All too easy...
 
(more to come shortly)

Revision as of 19:12, 7 November 2004

Introdution to SOM (System Object Model)

by Prokushev

System Object Model (SOM, SOMObjects) is a language neutral object model. Main advanage of SOM is possibility to implement classes in any language which supports DLL creation or usage. Only defined thing for such model is Interface. Interface described in terms of Interface Definition Language which can be translated to corresponding language binding. Classes represented in binary form (In language-specific object models classes exists only virtually until compilation. As example of such languages can be C++, Delphi, Pascal and other.). Actually, inherence implemented during runtime, like in true object-oriented languages like SmallTalk. Instanse of class represented by object. Actually, objects of same class shares same code. Code ca be stored either in DLL or in EXE. Most usable is DLL. DLL can contain one or more classes. DLL, in terms of SOM, named as classes library. Most of SOM functionality (except implementation of core logic) implemented with classes library.

By default with eComStation shiped lot of general classes library. One of then used every day and every minute, another - not so often. Later we will briefly look at all of them. Classes libraries includes:

Most notable classes (from users point of view) is Workplace Shell Classes. Desktop objects is SOM in work. Every day users uses SOM objects and most of them like it.

SOM objects can be manipulated easely. Using power of Object REXX and SOM users and programmers can do fantastic thing without any problems. WPS can be easely customized and manipulated with Object REXX.

Another powerfull set of classes is OpenDoc Classes. Not part of eComStation system they allows to have higly integrated and user-friendly applications. If programmer will support OpenDoc then we can have lot of good application (sick! No application term in OpenDoc word!). No monsters like Open Office or Lotus Smart Suite. No applications like GIMP. Only components which allows to build documents with very-very impressive content by easy operations. It is possible. It is future of OS/2 and eComStation. We can make our word better. So, in future, we'll try to review OpenDoc classes closer.

Don't forgot about DSOM classes - implementation of CORBA specification. Not latest, but we can move forward and extend DSOM classes to support most (or all) features of current CORBA specification. It is also possible. SOM is open model. Most of classes and methods can be easely extended or replaced.

Don't forgot about other object models also. Most notable is XPCOM. Mozilla users uses XPCOM every time. It's DOM support. XPCOM can be wrapped by SOM classes and reused by OS/2 programmers. It's anothe topic for future reviews.

Remember Java. Java classes and objects can be accessed via SOM. Mixing portable and native solutions allow us to have fantastic things. Native interface and cross-platform background. And vise versa.

We can do all of it, we must do all of it. We must learn such things as SOM. Really, things not so hard as we think.

Lets create our first SOM class. It is easy.

Step 1. Write interface Step 2. Create binding Step 3. Write class implementation Step 4. Use class

Nothing hard. All too easy...

(more to come shortly)