[Seaside] Some Javascript issues

Lukas Renggli renggli at gmail.com
Tue Jul 20 12:13:42 UTC 2010


The idea of the Seaside abstraction is to provide a convenient
interface Javascript code, not to implement Javascript functionality
in Smalltalk. If the Smalltalk code starts to get longer than a few
lines, have conditionals and loops, I suggest that you write extract
the code to a separate Javascript library and call it from Smalltalk.
JQueryUI, JQueryWidgetBox, ... provide such examples.

Lukas

On 20 July 2010 14:08, Martin Büttner
<martin.buettner at student.hpi.uni-potsdam.de> wrote:
> Hi,
>
> in my recent project I have fairly complex Javascript/jQuery code and
> whenever possible I use the Seaside abstraction.
> Unfortunately this frequently leads to bloated code, e.g. when I want to
> implement "==" on client side. My current code states:
>
> aQuery addDecoration: (JSBinary new operator: '=='; statement: aStatement).
>
> JQuery provides convenience methods for && and ||, but nothing else. Is the
> above line really best practice? The code gets awfully long.
>
> As well, there is no possibility to surround a number of statements with a
> for-block or another loop. I wrote a new JSDecoration now similar to
> JSCondition, but I suggest someone extends Seaside with that.
>
> Or do I overlook something in the framework?
>
> Thanks in advance,
> Martin
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside mailing list