Sitemap
Business > Online
AJAX - Industrial strength cleaner for your website

If you've had anything to do with internet technologies in the last 12 months, it is likely that you have come across the term “AJAX”. Like most new technologies there seems to be a great deal of hype surrounding it, so we thought we would try and clear the air a little by explaining how it works and what it does.

What does it do?

AJAX stands for 'Asynchronous JavaScript and XML' and it represents a new way for websites to display, save and manipulate data.

Traditional websites display information statically. If the information contained on the page were to change, the page would have to be refreshed and a new page with new information retrieved from the server. People have attempted to address this shortcoming through the use of embedded technologies like Java Applets and Flash - with varying degrees of success. However, these technologies are usually limited to a small part of the page and do not allow the page itself to be modified.

AJAX makes use of JavaScript and a couple of other supporting technologies to update the contents of a page dynamically without having to reload or work within the constraints of technologies like Flash or Java Applets.
 

How does it work?

Back in 1999, Microsoft included a little ActiveX component called “XMLHTTP” with Internet Explorer. This component allowed programmers to send and receive messages to a server using JavaScript. JavaScript also has the ability to manipulate parts of an HTML page through the browser’s Document Object Model, but people didn’t think of linking the two together until recently.

Other browsers such as Firefox and Opera have also implemented XMLHTTP compatible objects in an attempt to correctly render websites that use the component. Now that most major browsers have the same ability, web developers can start to pay attention and use the technology in a serious way.
 
Pros:
It is cool. It allows websites to be that little bit more interactive and provide the user with a more tactile browsing experience. Websites act less like websites and more like traditional applications installed on your computer.
 
It can make online systems more responsive as the entire page does not need to be downloaded at every change. This also saves on bandwidth or download costs.
 
It has sparked new interest and enthusiasm in the online programming world. This will lead to another kick in developing online technologies and this should lead to a general increase in the quality of internet delivered services.
 
Cons:
The use of AJAX technology is still relatively new and therefore there are still some wrinkles that require ironing out.

A prime example of this is the "Back" button bug. As the page is no longer reloaded with every press of a button or click of a link, there is no history for the browser to collect. After all, you are still on the same page. This renders the “Back” button completely useless.

Another commonly encountered problem is bookmarking. With normal websites, each page has a unique address so if you record the location with a bookmark, you can go back later and see the same page. With AJAX, the same page performs all the functions of the website, so the address will not change with the content and bookmarking will only display the initial page state.

There are workarounds to these problems but they are clumsy and do not completely resolve the issues.

Another common criticism of AJAX is that it is not sensitive to accessibility issues. The good thing about HTML documents is that they all have a similar structure, which means accessibility tools such as screen readers can read the contents of a website through a speaker. With AJAX and the way it dynamically changes the content on a page, this becomes impossible.

Other browsers that do not support any part of the AJAX chain such as XMLRPC, JavaScript or the DOM are similarly disadvantaged, so while a normal shopping cart may work fine on mobile phones or handheld devices, the flashy new AJAX site will not.
 
Finally, AJAX requires more development effort than normal websites. AJAX uses technologies that highlight the differences between browsers so while it is easy to dodge compatibility issues with plain HTML, workarounds to ensure compatibility must be put into place. Google has actually implemented several versions of GMail to deal with the differing capabilities of browsers.
 

Web 2.0

If you have heard of AJAX, it is just as likely that you've heard of Web 2.0.
 
In essence, Web 2.0 is a buzz word. No one is really sure what it means and since it lacks any real definition, people like to throw it around. The general gist of Web 2.0 is that it embodies all of the new ideas and concepts being implemented online at the moment. It is about blogging, online collaboration, online communities, RSS data feeds and of course, AJAX.

Web 2.0 may also offer the potential to replace some of the traditional PC applications like Microsoft Office with online systems of similar functionality. This will be difficult to achieve with the limits that the current web programming tools have, however that has not stopped companies like Google from trying with varying levels of success.

So, while AJAX may be the latest in online development fashion it still has a few drawbacks, and the decision to use it should be carefully considered before beginning a project. That said, it does give programmers a powerful new tool to use when creating online applications.
Latest Web Design Articles