[Seaside] Javascript Integration

Lukas Renggli renggli at gmail.com
Sun Apr 5 06:46:57 UTC 2009

Hi Owen.

Creating Javascript works very similar to creating HTML: You ask the
HTML canvas for a Javascript brushes. You configure it using a cascade
of message sends, compose it with other Javascript brushes and
eventually assign it to some event handlers.

In Seaside there is built-in support for Prototype/script.aculo.us
(starting from Seaside 2.7) and jQuery/jQueryUI (starting from Seaside
2.9). You can use all features of these libraries without writing a
single line of Javascript code. Every feature is modelled as an object
in Smalltalk that knows how to transform itself to Javascript.

If you are fluent with these Javascript libraries, you'll immediately
know how to use them. All entities are named the same way as their
Javascript counterparts. Sometimes it helps to look at the respective
Smalltalk classes for nice helper methods, so that you can use
callback blocks, etc.

A good start is to work through the functional test-suite and play
with the examples. They come with the Seaside distribution and can be
found under /seaside/tests/scriptaculous, /seaside/tests/jquery and
/seaside/tests/jquery-ui. You also find links to instances of the
tests running online <http://www.seaside.st/about/examples>.

Feel free to ask further questions!


On Sun, Apr 5, 2009 at 6:21 AM, Owen Densmore <owen at backspaces.net> wrote:
> Hi folks .. a newbie here.
> I just took a great Seaside workshop, given by James Foster of GemStone.
> One issue that I didn't understand as well as I'd like is Seaside-Javascript
> integration.  I know Prototype/Scriptaculous (and others) are used, but I
> wasn't clear what the *architecture* of the integration was.
> For example, are there tiny code fragments built up by the component
> libraries that create a script?  Is there some smalltalk-to-javascript
> translation taking place?  Is there a Seaside specific javascript library
> loaded onto the client that makes for smooth integration with seaside?
> I'd *love* a pointer to a tutorial on Javascript integration.  Or pointers
> to which classes to read in detail -- the ones actually spouting javascript
> and receiving the Ajax XMLHtmlRequests.
> Thanks!
>    -- Owen
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Lukas Renggli

More information about the seaside mailing list