VA 8.6.2 is there …

… the new version of VA Smalltalk 8.6.2 is available at Instantiations

Posted in Smalltalk | Tagged , | Leave a comment

VASmalltalk and its CompositionEditor …

VASmalltalk offers two frameworks to create user interfaces: WindowBuilderPro and CompositionEditor.

The WindowBuilderPro is the more usual approach and is available in all other IDEs like VisualStudio or Eclipse.

The CompositionEditor is the original IBM approach – and the opinions about this tool are very different among all users. Its a visual development approach and the main problem with it is, that one cam use in very easily in the wrong way – resulting a bad managable software: Spaghetti code in a visual environment.

But if you use it the way it is meant to be used it can be a very quick tool to generate simple dialog based software.

One of the most important points is, that you write your logic code in Smalltalk methods and the logic is in these methods – not in the visual links.

The visual links in the CompositionEditor should only be used to connect your GUI to your logic methods.

When creating the REST methods (via PUM) for VASmalltalk for our Gemstone system I noticed, that the interfaces do not match the CompositionEditor principles.

When working with Sencha JS you normally think in sets of instances. Under VASmalltalk you may consider thinking in single instances you work on. Therefore the Smalltalk logic methods should work on sets – but should also do the conversions needed from single instance thinking to set thinking – otherwise you will be force to do a conversion (and then you simply create too many visual links). Therefore PUM now now only creates Actions for the normal CRUD interface, but also ACTIONS for single instance handling and ACTIONS for base collection handling to get rid of all the conversions needed.

To summarize: The CompositionEditor is still a powerful tool to create simple form oriented application, but one should be aware to create lots of parts working together and not fill all stuff in ONE large part. The visual links should only be used to create the visual (GUI) events logic.

Posted in Smalltalk | Tagged , , | Leave a comment

PUM, Gemstone and VASmalltalk as a REST client

PUM (now somewhere with a version around 08.06.01-02.06.27) is able to create a VASmalltalk client source code to create classes needed in the API definitions. It creates the API calls and all the needed Abt* methods on the class side … now the time of testing and simple client writing starts in VA.

Posted in Smalltalk | Tagged , , , | Leave a comment

VASmalltalk, HTTPClient and cookies …

While writing a RESTClient Runtime for VASmalltalk for my Gemstone system I needed to write a HTTPClient able to handle my cookie send from Gemstone. How is it done ?

Create a subclass from SstHttpClient and add an instance variable (e.g. sessionCookie) to hold the cookie returned from the server.

Now overwrite the following method to set the cookie when sending the request:

buildHttpPOSTFor: aUrl using: basicAuthCredential
req := self templateHttpPOSTMessage copy.
basicAuthCredential isNil
ifFalse: [req header authorization: basicAuthCredential].
req header
url: (self requestUriForUrl: aUrl);
host: aUrl hostport.

sessionCookie notNil ifTrue:[ req header cookie: sessionCookie ].

And in the case of a POST call I changed my calling method to the following stuff to catch the value of the cookie delivered by the server:

callAPI: urlString method: httpMethodName parameter: parameter resultModel: resultClass
| response tempURL parameterAsJSONString responseAsString cookie |

tempURL := self baseURL copy.
tempURL path: urlString.
parameterAsJSONString := parameter isNil ifTrue:[ nil ] ifFalse:[ NeoJSONWriter toString: parameter ].
response := self post: parameterAsJSONString typed: 'application/json' at: tempURL.
(cookie := response header setCookie) isNil ifFalse:[ sessionCookie := cookie ].

Posted in Smalltalk | Tagged , | Leave a comment

Smalltalk User Meeting in Hamburg cancelled …

… and Meetup group just before closing …

Posted in Smalltalk | Tagged , | Leave a comment

Smalltalk User Meeting in Hamburg (September)

A date for the next Hamburg Smalltalk user meeting is about to be selected:

Select a date

Posted in Smalltalk | Tagged , , , | Leave a comment

PUM 8.6.1 – 02.06.22

New version out with small points:


-> accessMethod created in service class to have direct access to the root of the persistency tree of the data – to unify the programming style among several projects

-> sessionID method created in the service class – needed for the lower level framework. I noticed this problem, while starting a new project. This was a little bit trickier, because the system has to look for all :n associations in the model and find out, where the sessions are really handled

Posted in Smalltalk | Tagged , , , | Leave a comment