Ajax improvements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Ajax improvements

Janko Mivšek
Dear all,

As Nico already mentioned I did recently some Ajax improvements in Aida
and maybe you'll be interested to read about that bit more.

Let me start with a short intro to Aida Ajax support.

As you know in Aida we have an integrated Ajax support, which allows us
to do things like immediate posting of an input field very easily:

        (e addInputFieldAspect: #name for: aPerson)
                onChangePost

This will send and update on the server the name of that person
immediately after entered, via Ajax call in the background. Another nice
feature is to refresh some element on the webpage after such a change:

        (e addInputFieldAspect: #name for: aPerson)
                onChangePostAndUpdate: someElement

So, besides posting we will also update the specified element on the
webpage, to reflect a new content we just entered in the input field.

Those two examples show basically the main strengths of Aida Ajax
support. You can see that we stay in the Smalltalk all the time and we
don't need to deal with HTML and Ajax things like web element ids, which
are mandatory for Ajax. Those ids are namely needed to uniquely identify
an element of the webpage:

        <DIV id="id37">..</DIV>

While most of other web frameworks force you to do that manually, Aida
do it automatically. And this magic was a subject of recent improvements.

All starts when a checkbox Ajax update didn't work well. You could check
but not uncheck. But this then reveal more problems with id registration
machinery. Problem is, that id of updated element need to stay the same
as of old element and this copying and re-registering of new element in
place of old one was problematic in certain cases. I cleaned up that
part of the code which is now also more simple to understand and from
testing so far it seems it cover all cases reliably.


Best regards
Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida