Friday, January 2, 2009

Choosing an AJAX Platform

When looking around for a good AJAX platform to use for development of a new application I am working on, I came across many platforms each with its own strengths and weaknesses. I would categorize them as follows:
  1. Coding is done using a server side XML which in turn generates Flash or XHTML files (Open Laszlo)
  2. Coding is done using server-side Javascript which in turn generates client side Javascript based AJAX interface (Jaxer)
  3. Coding done using a server-side language (Java, PHP, ASP.NET) which in turn generates client-side Javascript based AJAX interface (ZK, MS AJAX, YUI.NET)
  4. Pure client-side Javascript AJAX libraries which can further be categorized into:
    1. libraries only providing multi-browser javascripting capabilities along with basic animations (prototype, jquery)
    2. libraries providing a complete set of user-interface widgets along with multi-browser scripting and animations (Dojo, YUI, Ext)
The cons of each method in the same order are as follows:
  1. Single vendor only, capabilities limited by what has been implemented leaving very little room for customization
  2. Single vendor only, capabilities limited by what has been implemented leaving very little room for customization
  3. Client-side Javascript coding limited by what has been implemented leaving very little room for customization
  4. For client-side libraries:
    1. User-interface widgets not available; the source code will be split into 2 languages, 1 on the server-side and 1 on the client-side
    2. The source code will be split into 2 languages, 1 on the server-side and 1 on the client-side
I like the last option the best as it gives me the most opportunity for customization of the user interface and also provides the most needed widgets out of the box. Yes I will have to work with both Javascript and a server-side language but then web development has always involved knowledge of more than one language.

There is also the question of the licensing cost of the platform you choose. Although almost all of the platforms I have mentioned above are open-source, some of them may cost you if you decide to develop a commercial product (ZK and Ext).

So I came down to deciding between Dojo and YUI. Dojo has a huge community supporting it and provides a lot of opportunity for customization but unfortunately its documentation is not that complete. YUI on the other hand has loads of documentation right out of the box to get a first time AJAX developer up and running in no time.

For my current project I have chosen to go with YUI but definitely in the future I will user Dojo.

1 comment:

Safder Ghauri said...

Nice article very very informative
thanks