|
AJAX – Asynchronous JavaScript and XML, is a technique to develop interactive web applications. Note that it is not a technology itself but a combination of several technologies:
- XHTML / CSS
- DOM
- XMLHttpRequest Object (Kernel of AJAX Engine)
- XML
Figure 1 is a snapshot of a task menu similar to Windows XP made using AJAX . It provides the ability to expand / collapse without reloading the page.
Figure 1
The JavaScript code is very simple by making use of TaskMenu and TaskMenuItem object as below
item1 = new TaskMenuItem("About us","Image/about.gif",””);
item2 = new TaskMenuItem("Chatroom","Image/friends.gif",””);
item3 = new TaskMenuItem("News","image/update.gif",””);
taskMenu1 = new TaskMenu("Beans Portal");
taskMenu1.add(item1);
taskMenu1.add(item2);
taskMenu1.add(item3);
taskMenu1.setBackground("Image/bg.gif");
taskMenu1.init();
In a nutshell, AJAX has the following positive impacts
- Improved performance and smoother responses – No need for page reloading
- Multiple interactions – due to asynchronous communication
- Automatic data refresh – allow client polling
- Real time support – enable monitor of user actions
- Richer interactions – enable advanced features like drag and drop, etc.
As a popular technique, you should follow this new trend closely as AJAX is all about improving user experience. And it is recommended to prepare strategies to adopt this technology wave.
|