Tuesday, December 05, 2006

 

What AJAX framework should I use

The most often asked AJAX question seems to be: What AJAX framework should I use. Let me give a few principles that will help to narrow down the selection from the current 300 or so into some that will be applicable:

  1. Does the website target visitors that only use the site occassionally? Or is it more like an intranet site where people use it for a long time?

    In the first case choose a light framework with downloads less than 200KB. With compression and gzipping that might get you down into the safe 50-100KB range. For sites where people stay long the initial download might be annoying but after that the cache should hopefully work (if you're stuck with IE 6 clients, no the cache won't work) so larger downloads are acceptable.

    Frameworks that have the option to load code piecemeal might be acceptable in the first case, but if the first page is fairly slow and the second is fairly slow, don't expect people to stay longer.

  2. Is AJAX used to enhance an existing site or is it one that is built from scratch?

    In the first case use a light framework, such as prototype.js. If it is for a new site you can even choose a tool that requires Java all the way. Even a tool that claims you don't have to know JavaScript (snicker).

  3. Do you have an existing backend or preference for a certain language/approach at the backend?

    Some tools such as GWT are integrated tools and requires a commitment to the back-end as well. Other tools such as Tibco GI are independent of the back-end. Other tools like prototype.js are backend independent but are designed to work particularly well with Ruby (on Rails).

  4. Will the site require many specific widgets? Examples are tabs, grids, date controls, type-ahead and such?

    If many widgets are required, it would be better to choose a framework that already has the widgets. Writing them from scratch takes time. Combining widgets from different frameworks is hard as drag/drop, color selection, and styling are not portable.



This should narrow down potential candidates. After that come more minor questions as can CSS be used to style widgets? How difficult is the HTML that must be generated in order for the widget to work? Or is the widget smart enough to insert the padding HTML itself?

Comments:
Thank you for these hints, Berend!

I have tried GWT and it is really cool for creating smart web applications in java.
 
I really don't like frameworks that are dependent on a backend, so I'm leaning toward Tibco GI myself. Another which might be worth checking out is OpenLaszlo. They are supposed to be working on a pure dhtml front-end. Yet another which is practically an application generator is Morfik. Very sophisticated, and generates the front-end and backend as the application itself.

What I think is even more critical though is a production quality Eiffel-based backend which can serve as the web services provider. Choices still seem to be slim in this area.

James
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?