Tuesday, November 5, 2024

AJAX – Executive Summary

AJAX (Asynchronous Javascript and XML) is a software platform to build and deploy Rich Internet Applications.(RIA) Some RIA applications include Flash, Java Applets and ActiveX Controls.

Without these kinds of applications, the clients are thin and monolithic, as in a Legacy Architecture. RIA’s put the smile back on the client machines, by maximizing their CPU utilization. You have had the scotch and the bourbon. Be ready to taste a cocktail now. Enter AJAX!

While AJAX represents a culmination of well known technologies like JavaScript, DOM, HTML and XML, it is not a language by itself. So what’s all the hype about? Let me explain :

The biggest problem that we face in web applications is the time taken for reloading Web Pages. This depending on what you have put on the page and the speed of your connection, can range from average to slow. In the meanwhile, think of an application where the page is refreshed in an instant. Or if the page has to come from the server, it does so in the background. So no more hour glasses, so to say, you see. A big headache goes away.

Now, imagine having the ability to use the following browsers: IE, Firefox, Safari and Opera (7.0 and above) without worrying about the quirks of each one of them. Think of the page getting refreshed intelligently depending on the type of your internet connection (dial-up , broad band etc.) Move away from page based design to event controlled interface. Intelligent User interface, which minimizes the number of clicks, for a rich user experience. And all this, without having to procure a plug-in or an applet and based on Open Standards.

Sounds like a dream. Please welcome AJAX! Again.

A small detour : As per Greek Mythology, Ajax was the son of Telamon, the king of Salamis. He was a mighty hero of the Trojan War.

When Netscape introduced the word layer in 1998, Microsoft went ahead with its DOM (Document Object Model), which relied on the new method called document.all in JavaScript. As Netscape lost the war to Microsoft (in early 2000) , they were unable to push the layer idea further, to appeal to the DHTML band of workers. Although, some thing similar is available in a rudimentary form – called ‘DIV’ tags.

An Ajax application does away with the start and stop repetitive interaction of a client and a server. Now instead of loading a webpage, at a session start, the browser loads an Ajax engine made of Javascript, safely tucked away in a hidden frame. Ajax applications manipulate DOM to control the UI and backend requests which were made as minimal as possible. Thus one could do anything like manipulate web forms or search queries or modify a record etc. In effect the user’s interaction with the application happens asynchronously, independent of server communication. The core of AJAX lies in a Browser based object named XMLHttpRequest which allows the browser to invoke remote calls back to the server without the need to reload the current page. Some of the functionality allows features like Drag and Drop, In Place Editing and Customized user views.

Now AJAX is not all ‘rosy’ as it seems. There are worries that AJAX may interfere with the Browser Back Button. Javascript has to be included manually in the scripts, sometimes using ActiveX (For IE 6.0 and below). People who would use AJAX would have to take care of network latency, through code. If this is not done well, there can be delays.

There are quite some number of AJAX IDE’s like BackBase, JackBe and some others. Some of the tools have a visual workflow. Google uses AJAX in GoogleSuggest and GoogleMaps. Others have also started to get a feel of this powerful paradigm.

By 2010, it is expected that 60% of all applications on the web would be RIA’s. Ajax will definitely be one of them, if not the leader. The others like XUL and XAML (part of Avalon – Microsoft) are also contenders.

Time to sing ‘In the jungle, the mighty jungle, the Lion sleeps tonight’.

Add to Del.icio.us | DiggThis | Yahoo! My Web | Furl

Rajesh Menon (Nickname Guru30)
e-mail: rajesh30menon@yahoo.com
Tel: 91-22-25890408

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles