AJAX advantages
posted on
December 16, 2008, 11:55 am
Comments: 0
When you use Google Suggest it is hard not to notice the way suggested terms update as you type them. Another good example of this "magic" is Google Map – it seems that everything you do happens almost instantly and there is no page refreshing.
Google Suggest and Google Maps are illustrating this new technique in the web applications which is called AJAX (Asynchronous JavaScript + XML).
Ajax itself is not a technology but a term for the usage of a group of technologies.
Ajax includes:
- XHTML and CSS for basic presentation;
- DOM (Document Object Model) for dymamic display of interaction with data;
- XML and XSLT for the interchange and manipulation of data;
- XMLHttpRequest object for asynchronous communication;
- JavaScript - to bring it all together;
Here is a simple example of how a classic web application model works: we have user actions in the interface which trigger an HTTP request back to a web server. Then the server retrieves data and then returns HTML page to the client.
How does it work and why is good to use it?
As mentioned above, Ajax uses JavaScript which allows performing the tasks with a minor perceivable delay with the user interface. This method makes browsing far more pleasant activity. Ajax strategy to the delay issue is just to update the portion of the page which needs to be updated. Sounds reasonable, right? People have tried for years to get to this point by using different technologies like IFRAMES but nothing turned out to be as good as Ajax. The possibilities of performing partial page updates, combined with a wisely designed web application can lead to almost no perceptible refresh delay.
Saving bandwidth
Generally web applications carry a lot of unnecessary information, especially if the pages are written in the old-fashioned HTML with significant amount of tags. That way the amount of data used for structuring and markup can be as much as the data required the serve up the textual content of the page. If we try to understand how Ajax works we will see that the applications download the page layout once and then update only the data which needs to be updated. That is an excellent way to reduce the time for loading a page.
Who uses AJAX?
It is well known that Google is making huge investments in Ajax development and as you can see all of the latest products which were started over the past one year (Orkut, Gmail, the latest beta version of Google Groups, Google Suggest, and Google Maps) are using Ajax. Among the other big companies which use this new approach are Flickr and Amazon. This comes to show that Ajax have a wide practical usage. Note that Ajax applications can vary – they can be small and very simple, as Google Suggest, or they can be complex like Google Maps.
Ajax can be used in different major browser platforms. That includes Internet Explorer, Mozilla FireFox, Netscape, Opera and Safari.
Performing those micro-updates can significantly limit network loads. You can get a clear idea of the benefits that Ajax carry if you compare the amount of total bytes transferred, total download time and steps needed to complete a task.
The integration of Ajax is notable when you see a high-profile offering such as Google Maps but you may be surprised to know that even the small companies are using it.
There are no technical obstacles when using Ajax because it relays on a stable and already studied technologies. It is the designer of application who should start to think a little more “out of the box” and to explore a whole new world of opportunities.
|