Nov 24, 2008

Ajax Frameworks

The best technology to build dynamic web pages is Ajax. JavaScript code embedded into the HTML page is used to send requests to the server. At the server side, some processing is required to handle them, find the info or store the data. To do that, we need for a specialized framework. The framework has always a JavaScript part, and sometimes a server side part in another scripting language.

Why a framework?

Actually, this framework is the Ajax engine described by J. J. Garrett and intended to suppress waiting for the user when accessing the server.
The framework provides classical, cross-browser functions to use the XMLHttpRequest object. But a framework may goes beyond that, and allow to build "rich web applications", applications with a graphical user interface and other features of desktop software that run through a browser, while exchanging data with a remote server.

Features of an Ajax framework

Any Ajax framework is able to communicate with the server, and thus, to read data or to send it data or commands. In the last case a server-side script is required.
The frameworks often add components that make use of the asynchronous communication with the server.
The classical examples are buttons, tabbed panels, grids, listboxs and other such widgets.
A more innovative example, the "boxes", are more and more often implemented, and Lightbox and Slimbox are two of them. There are image galleries that place them side by side on the screen and that are making use of Ajax to display them instantanously .

Framework may be server-driven also, and in this case, component are created on the server with a scripting language such as PHP, and sent to the browser. Ajax is used to transmit user actions to the server part, and to handle the results.

JavaScript libraries

Many Ajax frameworks and libraries rely solely upon JavaScript and contain no server components and therefore server technology dependencies.

Most of them use XML as data format, and sometime JSON, another textual format.

Ajax libraries and frameworks include:
# Prototype: Is the base of several other frameworks including that of Yahoo. Its goal seems to be in reducing the size of Ajax Code.
# Script Aculo: Add more features to prototype.
# Jquery: JavaScript library with Ajax support. It is equivalent to Script Aculo and uses less resources.
# Mootools: Another toolkit as JQuery, includes graphical effects.
# Dojo Toolkit: Uses packages with a mechanism to load them together along with the page. It can build reusable components and widgets, a lot of them is provided on the site. It allows to manipulate the DOM more easily, and to make graphical effects.
# Yahoo UI: Library from the Yahoo search engine. Includes CSS resources.


No comments: