Jean-Marc Orliaguet jmo at ita.chalmers.se on Z3lab mailing-list Thu Jul 14 21:26:20 CEST 2005
I've been testing various "Ajax" libraries recently and these are my
impressions (they correspond to the use cases that I have, others
certainly have other needs):
- first of all there is a lot of buzz around Ajax, when you start
looking for an Ajax framework you are likely to find all sorts of
libraries that do just anything on earth: drag-and-drop, visual
effects, animations, sortable lists; they belong to the "Application
Then there are the XMLHttpRequest wrapper libraries (belonging to the so
called "Infrastructure framework" category).
- some of the libraries are meant to be kept simple and lightweight,
others are really heavy-weight libraries. The Rico  / Prototype 
libs for instance take a lot of CPU on every page load (up to 3 or 4
seconds depending on your hardware). You really feel it when you tune
down your CPU to 800MHz. Obviously you are not supposed to reload the page.
- for drag-and-drop stuff, contextual menus, etc. I find that PDLib 
is just fine for what I need. It has the advantage compared to the other
libraries that I've seen so far to refer to classes of elements as
opposed to a collection of element Ids. The Rico lib  and
script.aculo.us  for instance need to register as many Ids as there
draggable and droppable elements. With PDLib, you just have to declare a
CSS class as draggable and a class as droppable. That makes a difference
when you have lots of elements on a page. The only problem with the
PDLib library is that there are a lots of versions around. I have done
some local modifications on it for CPSSkins  with bug fixes from
CompositePack , etc.
- By the way: what does drag-and-drop have to do with AJAX?
drag-and-drop has been around for years... My impression is that it is
better to keep the XMLHttpRequest part separate from the fancy stuff.
- So the next question is: what is the core functionality you'd expect
from an "Ajax" JS library? I've done a list of use cases for cpsskins
and it all comes down to one thing: being able to send requests to the
server and getting the result of the request inserted into the page in a
given place without reloading the page.
- An important factor is that it should go fast, so I started to look to
'lightweight' libraries   with the minimum number of features
implemented. Sarissa  has a lot of XML/XSLT features that I feel
could as well be implemented in zope and that I presently have little
So I tested 'DataRequestor.js'  which is exactly what I need (simple
to use and fast).
- I've set up a test / demo page that updates a fragment of a page with
the date fetched from zope every time the uses clicks on the button:
- Conclusion: be careful with the buzz that surrounds Ajax, identify the
needs of your application, do benchmarks.
I hope that this review can be useful.
 http://openrico.org/demos.page - rico.js (69kB ...) + prototype.js
 http://prototype.conio.net/ - prototype.js (28kB)
 http://script.aculo.us/ - dragdrop.js (19kB) - effects.js (21kB) +
 http://sarissa.sourceforge.net/doc/ - sarissa.js (27kB)
 http://mikewest.org/projects.php?action=viewProject&projectID=1 -
DataRequestor.js (16kB / documentation included - 6.4kB without the doc)