Seaside SqueakPortPlatformApp proposal

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Seaside SqueakPortPlatformApp proposal

Postby TriSebastian » Thu May 07, 2009 7:52 am

Hi Seasiders!

I would like to propose a solution for upcoming Squeak ports.

For a lot of Squeak ports might need a XYZPlatformApp due to platform specific codings in classes wich might not be included in VASmalltalk 8.0, I expect a huge problem with all those parallel implementations.

Example:

GoogleChart has a implementation Color>>#fromString: aSymbolString within it's PlatformApp
Flotr has also a implementation of Color>>#fromString: aSymbolString within it's specific PlatformApp
If someone might already have loaded GoogleChart and tries to load Flotr in addition to that, he might get a load failed due to fromString: may only be defined by one of these....

That shouldn't be a problem for experienced VASmalltalkers, but for Newbies this might be a pain. And could even deter them from using VASmalltalk.

My suggestion on that issue would be the introduction of a CommunityPlatformApp. Everybody uses this application for portinglayer extensions. Result from this might be no duplicated codings and no confusion.

I know that next minor releases of VASmalltalk 8.0 will have additional base extensions,... but I don't think that instantiations will be able to support all wished functionalities needed for porting.

I can't actually say, if it might be needful to have a SqueakVASTCommunityPlatformApp next to a VWVASTCommunityPlatformApp and a DolphinVASTCommunityPlatformApp, or just one VASTCommunityPlatformApp ...

What do you think about that idea?!

[|]
Sebastian
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Seaside SqueakPortPlatformApp proposal

Postby a3aan » Thu May 07, 2009 8:14 am

It must be one app otherwise the various platform apps will (soon) conflict with each other.
TriSebastian wrote:I can't actually say, if it might be needful to have a SqueakVASTCommunityPlatformApp next to a VWVASTCommunityPlatformApp and a DolphinVASTCommunityPlatformApp, or just one VASTCommunityPlatformApp ...

Cheers,
Adriaan.
Adriaan van Os
a3aan
[|]
 
Posts: 45
Joined: Fri May 25, 2007 1:41 am

Re: Seaside SqueakPortPlatformApp proposal

Postby wembley » Fri May 22, 2009 9:26 am

Sebastian -

There are 2 cases to be handled:

1) GoogleCharts and Flotr both want a Color>>#fromString: method, but they need the method to have different semantics
2) GoogleCharts and Flotr both want a Color>>#fromString: method with identical semantics

The first case is nearly impossible to handle without renaming one of the method implementations or subclassing Color. However, the second case is easily handled using a technique that I will call optional extension subapplications. In fact, if you use this technique, you will not need to make any changes to your application if Color>>#fromString: ever ends up in the base code.

I will use the RBParserApp from V8.0 as an example. If you want to follow along, open an Application Editions browser and select the RBParserApp. Notice that this app has one subapp -- RBParserVAApp. This subapp contains the VA Smalltalk unique code for the parser.

Now switch the browser to the Subapplication Names view and select the RBParserVAApp. Notice that this subapp has 3 subapps of its own, all with names beginning with RBParserVAStub_. The remainder of the subapp name relates loosely to the extension method selector (for example, RBParserVAStub_rightArrow). These subapps contain no code -- they only server to anchor the extension and allow it to be optionally loaded.

Now select the RBParserVAStub_rightArrow in the Subapplication Names column. Notice that this subapp has just one subapp of its own -- RBParserVA_rightArrow. This subapp contains just one extension method -- Object>>#->. All the magic is in the configuration expression for this subapp. The expression is:
Code: Select all
(Object canUnderstand: #->) not or: [((Object>>#->) application name indexOfSubCollection: 'RB' startingAt: 1) == 1]

So, this subapp is loaded, supplying the extension, only if the extension method is not understood (meaning it does not already exist in the image) or if the extension method is provided by a (sub)app whose name begins with RB (to allow for reloading of the extension).

That's all there is to it -- pretty easy if you know how to do it (I learned this trick from Eric Clayberg many years ago).
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: Seaside SqueakPortPlatformApp proposal

Postby daswartz » Sat May 23, 2009 6:59 am

wembley wrote:There are 2 cases to be handled: 1) GoogleCharts and Flotr both want a Color>>#fromString: method, but they need the method to have different semantics 2) GoogleCharts and Flotr both want a Color>>#fromString: method with identical semantics

The first case is nearly impossible to handle without renaming one of the method implementations or subclassing Color.


Or if VAST had full namespace support. :wink:

Doug Swartz
daswartz
 
Posts: 48
Joined: Sat Oct 21, 2006 8:12 am
Location: Omaha, USA

Re: Seaside SqueakPortPlatformApp proposal

Postby skrishnamachari » Thu Dec 10, 2009 4:55 am

What is EsSmalltalkNamespace for..?

Is it non-trivial to support proper namespace with this...
skrishnamachari
 
Posts: 7
Joined: Sun Jun 28, 2009 9:58 pm


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest