[Seaside] Some Javascript issues

Martin Büttner martin.buettner at student.hpi.uni-potsdam.de
Tue Jul 20 12:21:58 UTC 2010


Okay, thanks. That's the answer I wanted to hear ;)

Am 20.07.2010 14:13, schrieb Lukas Renggli:
> 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
>>
>>      
>
>
>    



More information about the seaside mailing list