Author Topic: WPS Classes Clone  (Read 20854 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
WPS Classes Clone
« on: November 17, 2013, 02:39:38 pm »
I'm opening this thread to discuss the WPS Classes clone idea. I'm sorry I hijacked other threads.

Why WPS?

I'm learning more about WPS with time, but I still think that is a valid approach for creating the resources that manage the OS/2-eCS desktop.

The Re-usability idea
When you create a new class to create a new object on WPS you don't start from scratch. You have several other classes that you can re-use to build your class (WPClass, WPObject...all)

Look for example the HWman class replacement. The goal of this was to improve some issues that the original "Hardware Manager" has.  The author did not start creating a "Hardware Manager" by scratch. He made a "child" of the hardware manager class (HWManager) and replaced (overide) only the functionality that has the issues.  So in fact he coded less.

Expandable
You can also expand the functionality of objects on the WPS. By creating a "child" of the classes you can expand

Just look again the HWman class replacement. The author fixed the behavior of a close source program. I had never saw that, in general if you don't have the source code of the program, you can not expand it or improve it.

Down Side
But I also think there are some downsides:
- We depend on the old IBM somcompiler. (sc.exe)
- We need to learn how WPS works before improving it / replacing it with OSS components.
- Having this flexibility also grows the complexity. We need to have and understanding on how are the WPS Classes structured.

Actions:
For the moment my actions are simple on this subject:
- Trying to include more documentation about WPS on the EDM/2 Wiki
- I'm trying to document the UML visual design of WPS Classes (attachment included).

If anybody wants to help me with this starting point I will appreciate it. It does not matter if only have some minutes at week.

My UML is very rusty.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #1 on: November 19, 2013, 10:25:29 pm »
By the way.

Since this year we also have this documentation source available for the public:
http://www.edm2.com/index.php/Object-Oriented_Programming_Using_SOM_and_DSOM

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: WPS Classes Clone
« Reply #2 on: November 20, 2013, 06:07:15 am »
Quote
Down Side
But I also think there are some downsides:
- We depend on the old IBM somcompiler. (sc.exe)

This is the killer. Until an open source sc.exe is written, working on the WPS is limited to people with the tools. Tools that are not commonly available.
I'd suggest that if you want to work from the top down, then the top would actually be the tool chain to work on the WPS.
Also in writing the tool chain knowledge about the WPS internals would be learned.
« Last Edit: November 20, 2013, 06:09:15 am by Dave Yeo »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #3 on: November 20, 2013, 01:36:46 pm »
I agree with you Dave. We need an open source sc.exe compiler for an open WPS/SOM to succeed.

But I just want to add that on the OS/2 platform sc.exe is available for download and use. It is on hobbes and on the eComStation CD#2.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Ben

  • Guest
Re: WPS Classes Clone
« Reply #4 on: November 20, 2013, 07:12:30 pm »
How can this be done?

Is there something upon which to base a new SC.exe?

Or would a new one have to be developed totally from scratch?

Are there old sources in the Developer's Toolkit that can act as a guide for a new, open sourced version?

I'm not writing about using the original sources directly, but is there nothing that can be used just as a guide.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #5 on: November 20, 2013, 11:01:29 pm »
Chris Wohlgemuth tried to make a sc.exe replacement for Voyager but the source code is not public. (to me)
http://svn.netlabs.org/v_nom

I really don't know if he finished it or not. According to Netlabs wiki Chris had a working prototype.

Regards.

« Last Edit: November 20, 2013, 11:04:20 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andy Willis

  • Sr. Member
  • ****
  • Posts: 292
  • Karma: +7/-0
    • View Profile
Re: WPS Classes Clone
« Reply #6 on: November 21, 2013, 12:15:39 am »
There is also an Open Source sc.exe and SOM implementation available that Martin reported some time ago:
SOMFree.  There is not currently an OS/2 port of it but there are Linux, MAC, BSD, and Windows so it is doable.  What I would like to see though is a WPS clone built off of it for at least Linux and Windows so that I could have a common solid dekstop across platforms.

Ben

  • Guest
Re: WPS Classes Clone
« Reply #7 on: November 21, 2013, 01:28:18 pm »
Martin, it would seem to me that it would be timely for someone who knows Chris Wohlgemuth personally to contact him and inquire.

I do not know Chris myself, but he has been a significant contributor to the OS/2 community in the past and maybe still is.

It would be hard to believe that he would keep such a thing from the OS/2 community now... but it is his work.

Getting his version of SC.exe would be a good, early step-forward on this. Maybe then, someone with the correct skills could pick it up and carry on with it.

Who knows?

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: WPS Classes Clone
« Reply #8 on: November 24, 2013, 01:21:20 pm »
May I add my opinion:

1) rewrite WPS: forget it. I guess about 100 man years or even more that went into this task. In my opinion it would be much more efficient to iron out the problems in some of the WPS classes and to add the functionality that is missing. A good example is XWorkplace.

2) "HWMan" example: when I wrote this HWManager class replacement the problem was not the lack of documentation of the HWManager class or that part of the HWManager interface is only private. The biggest problem I was facing was that the Resource Manager interface (accessible via RMINFO.DLL from an application) is not fully documented. I had to do trial and error.
For the private part of the HWManager interface (the part not published via the IDL file): with some trial and error and good guesswork I could guess the method signature of those methods that are private and the XWP class manager helped me in guessing what the method names were. The nice thing about SOM is that you can query a method address via its method name. In other words: That allows you to access methods that are not published by the IDL file.

3) sc.exe: remember that sc.exe is just a very shallow front end to the "Emitter" SOM classes. When you say you want an sc.exe replacement you will need to rebuild the "Emitter" class libraries. sc.exe just invokes methods of these SOM classes. The DLLs can be found as "emitxxx.dll" in the \OS2TK45\SOM\LIB subdirectory. As you can see from the names, it's these SOM classes that generate the source files with the corresponding file extensions.

4) learning about SOM / WPS: for my own learing progress I implemented a WPS class that realizes those yellow sticky notes.
This class is derived from the WPAbstract class (which also means it is placing all its content text into OS2.INI ...)
As an additional learning effort I also implemented a replacement class for that class that, stupid enough, just changes the coloring from a yellow sticky note to a red sticky note. While I did some stuff unnecessarily complicated and I would design it differently today there are quite a few things you can learn from that example:
a) how to remove and add menu items to an objects menu and tie these to functionality
b) how to add a completely new view to an object (that is none of the icon/structure/tree views but rather a new custom view), how to add this new view to the use list and how to make it show up in the window list
c) how to do some cleanup in OS2.INI on object deletion where WPAbstract does not do the job properly
d) how to do exception handling for a WPS class
f) how FFST (first failure support technology) works to add logging info to the system log (used by the classes to write exception info to the system log)
g) how a replacement class works / how you derive one class from another class

I never fully completed it but if anyone is interested I can clean it up a little and make a zip file from it. If someone can tell me where to put it ...

Lars

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #9 on: November 24, 2013, 01:54:31 pm »
Thanks Lars for the reply.

You can post the .zip file with your example classes here or at hobbes. If you agreed with this I can put it also on the EDM/2 Wiki as an example.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: WPS Classes Clone
« Reply #10 on: November 30, 2013, 04:16:42 pm »
Martin: I have sent the "PostWhat" WPS class source code to your private email address. This source code comes with no warranty whatsoever and may be freely used. If you place it on EDM, please add the additonal notes that I gave you in my email as to what the assumed prerequisites are.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #11 on: December 01, 2013, 01:17:57 pm »
Thank you Lars. I will be checking it and uploading it to EDM/2 and other sources.

I will put the source code with the BSD 3 Clause license, which is very liberal and clearly says  "AS IS".
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #12 on: December 01, 2013, 03:07:27 pm »
Thanks again Lars.

I took the information from this forum and the email you sent me and created a readme (and article on EDM/2) for the source code you sent me. I added the BSD license and made it version 0.1.

I created a page on the EDM/2 Wiki (http://www.edm2.com/index.php/PostWhat_WPS_Class_Example).

Next I'm going to upload this file (attached here) to hobbes.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #13 on: December 05, 2013, 06:37:25 pm »
Just as curiosity I also started to list some applications that uses the WPS, so it mean this applications creates childs of the WPS classes to create new objects for the desktop.

http://www.os2world.com/wiki/index.php/Workplace_Shell_based_Applications

It was easier to indentify those as applications that uses the WPS since I can do a google search over the OS2World github site and search for .idl files and .csc (older SOM).

I still need to keep surfing on hobbes for more, but you are free to post here any other application that uses WPS that you remember. I will keep growing the list.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: WPS Classes Clone
« Reply #14 on: December 12, 2013, 02:09:53 pm »
Any other software that creates a new WPS Class? No matter how old the software is, I just want to document it.

Just post the name here so I can check it out.
« Last Edit: December 12, 2013, 02:14:11 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.