The server-based AJAX libraries all have a common approach:
- Enable you to take a method on the server and declare it as AJAX callable.
AJAXPro doesn't offer the rich "automagic" components offered by ASP.NET AJAX Extensions, but it does offer the simplest experience when it comes to making a server API client-side callable.
AJAXPro offers an extremely simple but effective model:
- Add an attribute to a method declaring that the method should be AJAX callable.
The most widely used PHP AJAX library is xAjax, which allows you to define functions as you normally would and then make them AJAX callable via a single line of code. In terms of raw market share (again according to the Ajaxian.com poll), xAjax rules the PHP universe and it's easy to see why. The syntax is simple, clean, and gets the job done with minimal hassle.
Within the Java universe, you will find Direct Web Remoting (DWR) and the Google Web Toolkit (GWT). It's easier to get up and running with DWR, which involves less code to actually start making AJAX calls from the client than GWT. However, GWT offers much more complete debugging options and some big bonuses like nearly automatic support for the browser's back button.
The Choice Is Yours
||Best Suited for...
||ASP.NET developers who are trying to create a fully client-side experience and just want to make a few server-side API calls to get/set data
|ASP.NET AJAX Extensions ("Atlas")
|Direct Web Remoting (DWR)
||Java developers who want to get up and running with an AJAX solution quickly
||Client-side developers who want a strong abstraction between them and the browser's DOMClient-side developers who want the most impressive end effects from the least code
|Google Web Toolkit (GWT)
||Java developers who are willing to invest more time to get a more robust, easier-to-debug solution
||Client-side developers who want minimal abstraction between them and the DOMClient-side developers who want a library to speed up common DOM manipulation tasks
||PHP developers of all stripes
|Table 2. AJAX Solution Recommendations for Users|