Written by nitinpai on March 27th, 2007
Ajax Frameworks – Server side versus Client side
The advent of Ajax has brought about a lot of frameworks to the bill board, all boasting about their inept qualities in providing you the best from the rest. But how would you go about choosing a right kind of framework for your application.
In order to make things simple, the overall horde of Ajax frameworks can be classified into two major leagues:
- Server Side Framework
- Client Side Frameworks
Server Side Frameworks
Google Web Toolkit (GWT) is such a server side framework which is used as a normal Java Swing kind of programming on the server side in web pages using the GWT API. The GWT provides a tool for deploying your web application having such pages. During the deployment of the web application the GWT tools help in translating the Java syntax into the corresponding Ajax functionality to be brought on the client side.
Advantage of Server Side Frameworks
Other server side frameworks are : Yahoo Toolkit, DWR
Client Side Frameworks
- Cross browser compatibility – When you code its always a necessity that the code works independent of the browser type requesting it
- Mutliple request handling – Multiple asynchronous request have to handled properly when doing the callbacks
- Graceful degradation – You don’t want your code to fall flat on its face in case the browser does not support the XMLHTTPRequest object
- Exception and error handling – You should be able to catch the exceptions in your code instead of displaying it to the user
The extra features include widgets or even an IDE. Widgets are small interfaces or components which can be incorporated in an application easily through the client side frameworks. These widgets might compose of the following:
- Auto completing combobox
- A Menu system
- An accordian
- A tabbed pane windows
- Effects like fade, zoom in /out
Advantages of Client Side Frameworks
The examples of a client side framework are Prototype, DOJO Toolkit, Rico, Script.aculo.us, etc.
Going out to choose a framework in the Ajax field can be a bit overwhelming since you might think all look the same. But if you keep in mind the above classification then you can well have a feature matrix in front of you and also take less time in deciding on going for a particular one.