[GemStone-Smalltalk] Getting started with Gembuilder for VW

Martin McClure via GemStone-Smalltalk gemstone-smalltalk at lists.gemtalksystems.com
Wed Nov 21 08:32:11 PST 2018

On 11/21/18 6:54 AM, Annick Fron wrote:
> Hi Martin,
> 	This was helpful.
> 	But my main issue is that I have the same classes both in UserGlobals and UserClasses, and sometimes with a different version.
> 	If I user the right click menu « create in Gs » on a class in a browser, it creates it in UserClasses. But if I define connectors, it adds the same class name in UserGlobals.

Ooh, that inconsistency *may* be a bug. We'll investigate that -- thanks
for bringing it to our attention.

In the meantime, I recommend turning off generateClientClasses and
generateServerClasses. Then, when connectors connect at login they will
just map the client and server classes together, and not generate any
new classes. You can still use the browser's "create in GS" and "compile
in GS" with those options turned off.

> 	Besides, all my classes have a namespace, e.g. Compet.Competition.

This could also be the source of some of the difficulty. GemStone does
not have VW-style namespaces, and the design of GBS long pre-dates the
time when VW added namespaces.

By default, connectors only look in the Smalltalk namespace on VW.
However, as documented on page 72 of the GBS Users Guide, you can use a
VW fully-qualified name when creating a connector.

> 	What is the difference between:
> 	GBSM evaluate: ‘MyClass myInstances’ 
> and
> 	MyNamespace.MyClass myInstances performOnGsServer: #myInstances

I think that the latter would actually be:

	MyNamespace.MyClass performOnGsServer: #myInstances

With that change, the effect will be the same, the mechanism different.
#evaluate: invokes the compiler on the server, and evaluates the
resulting method. #performOnGsServer: does not involve the compiler, it
just sends a message. In this case it doesn't matter much which you use,
but if the necessary code already exists on the server I find it
slightly more elegant to just send the message.


More information about the GemStone-Smalltalk mailing list