Jump to content

How to program for the WPS: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
The WPS is based on SOM the [http://en.wikipedia.org/wiki/System_Object_Model System Object Model]. SOM allows access objects across various processes (including processes on remote machine) via [[DSOM]] classes, an implementation of an ORB compatible with an older (version 1.1) CORBA specification (remember SOM wasn't updated for quite a while. At hobbes there is a newer SOM implementation, but some people have reported problems with it).
The WPS is based on the [[System Object Model]] (SOM). SOM allows access objects across various processes (including processes on remote machine) via [[DSOM]] classes, an implementation of an ORB compatible with an older (version 1.1) CORBA specification (remember SOM wasn't updated for quite a while. At Hobbes there is a newer SOM implementation, but some people have reported problems with it).
There's a lot of fuzz about how advanced the WPS is because it uses CORBA etc. bla bla. In fact, most of the features of the WPS don't need a fully CORBA compliant ORB and, more importantly, don't use it. While Distributed SOM (DSOM) comes with OS/2, the WPS seems to use only local SOM.
There's a lot of fuzz about how advanced the WPS is because it uses CORBA etc. bla bla. In fact, most of the features of the WPS don't need a fully CORBA compliant ORB and, more importantly, don't use it. While Distributed SOM (DSOM) comes with OS/2, the WPS seems to use only local SOM.


Note: It is possible to use DSOM for WPS objects access. You need to start WPS DSOM server first.  
Note: It is possible to use DSOM for WPS objects access. You need to start WPS DSOM server first.


While it's possible to query, load, unload and replace SOM classes on demand during program execution, the WPS usually builds its class tree during initialization. Thus class replacement requires a WPS restart. Note that the adding of classes can still be done without a restart.
While it's possible to query, load, unload and replace SOM classes on demand during program execution, the WPS usually builds its class tree during initialization. Thus class replacement requires a WPS restart. Note that the adding of classes can still be done without a restart.
Line 8: Line 8:


===Prerequisites===
===Prerequisites===
* [[SOM Compiler]] - Contained in the OS/2 toolkit which comes with your commercial compiler or eCS.
* [[SOM Compiler]] - Contained in the OS/2 toolkit which comes with your commercial compiler
*:Or at http://hobbes.nmsu.edu/h-search.php?key=somobjtk.zip
*:or at http://hobbes.nmsu.edu/h-search.php?key=opendc12.zip
* C compiler - [[IBM VisualAge C++ 3.0]]
* C compiler - [[IBM VisualAge C++ 3.0]]
*:Or any C/C++ compiler. Open Watcom was tested for easy tasks and all worked fine. There was an article in a German magazine quite a while ago with an example using EMX.
*:Or any C/C++ compiler. Open Watcom was tested for easy tasks and all worked fine. There was an article in a German magazine quite a while ago with an example using EMX.
Line 18: Line 16:
* [[How to program for the WPS - Short overview|Short overview]] how WPS programming works in general.
* [[How to program for the WPS - Short overview|Short overview]] how WPS programming works in general.
* [[How to Program for the WPS - Tutorial|Tutorial]] for a simple WPS class.
* [[How to Program for the WPS - Tutorial|Tutorial]] for a simple WPS class.
* [http://wpstk.netlabs.org Workplace Shell Toolkit] - (C library to ease PM and WPS programming, supporting GNU compiler of emx V0.9d, IBM C Set/2 and VAC 3.08). Not SOM-based.
* [http://wpstk.netlabs.org Workplace Shell Toolkit] - (C library to ease PM and WPS programming, supporting GNU compiler of emx V0.9d, IBM C Set/2 and VAC++ 3.08). Not SOM-based.


[[Category:SOM Articles]]
[[Category:SOM Articles]]

Revision as of 23:34, 17 January 2020

The WPS is based on the System Object Model (SOM). SOM allows access objects across various processes (including processes on remote machine) via DSOM classes, an implementation of an ORB compatible with an older (version 1.1) CORBA specification (remember SOM wasn't updated for quite a while. At Hobbes there is a newer SOM implementation, but some people have reported problems with it). There's a lot of fuzz about how advanced the WPS is because it uses CORBA etc. bla bla. In fact, most of the features of the WPS don't need a fully CORBA compliant ORB and, more importantly, don't use it. While Distributed SOM (DSOM) comes with OS/2, the WPS seems to use only local SOM.

Note: It is possible to use DSOM for WPS objects access. You need to start WPS DSOM server first.

While it's possible to query, load, unload and replace SOM classes on demand during program execution, the WPS usually builds its class tree during initialization. Thus class replacement requires a WPS restart. Note that the adding of classes can still be done without a restart. Saying this doesn't mean you can never replace a class during runtime. It's always possible to bend the borders with some serious hacking but there's no general API for that.

Prerequisites

  • SOM Compiler - Contained in the OS/2 toolkit which comes with your commercial compiler
  • C compiler - IBM VisualAge C++ 3.0
    Or any C/C++ compiler. Open Watcom was tested for easy tasks and all worked fine. There was an article in a German magazine quite a while ago with an example using EMX.
  • For other programming languages (Pascal,... ) you need to write an emitter for the SOM Compiler which creates the necessary binding files.

Programming

  • Short overview how WPS programming works in general.
  • Tutorial for a simple WPS class.
  • Workplace Shell Toolkit - (C library to ease PM and WPS programming, supporting GNU compiler of emx V0.9d, IBM C Set/2 and VAC++ 3.08). Not SOM-based.