[Seaside] Using javascript toolkits for smalltalkers

Lukas Renggli renggli at gmail.com
Mon May 14 16:09:34 UTC 2007


>         I've imagined the smalltalk object would not be matching 1:1 the
> javascript ones but I have no clue of what technique is that for solving
> conflicts you've mention. It is well know in which domain? Javascript
> developers?

Well, in JavaScript you can copy groups of methods around and
introduce them into different classes/prototypes. Most JavaScript
frameworks I've seen make use of that to some extend. Unfortunately
Smalltalk doesn't have such a thing, unless you use Traits.

>         If I understood well scriptaculous smalltalk framework is about
> objects that once configured they know how to print them as javascript code.
> This is the serialization you are talking about right?

Exactly. This works well because the life-time of a JavaScript object
is only up to the next full page request. In the general case it is
not useful to keep the Scriptaculous objects as state in your
application. It is just a way to generate the JavaScript
programmatically, such as the canvas framework generates XHTML.

Diego Gómez made a framework that generates JavaScript code from
Smalltalk classes and methods by using a similar technique as the
Squeak VM-Maker. Like this you can build a whole object hierarchy in
Smalltalk and run it either in the Smalltalk VM or transform the code
to JavaScript and run it in the Web Browser. I don't know how well
this works integrating existing JavaScript code.

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list