The web is changing, and AJAX is leading the charge. Tim Dean looks at the first great Web 2.0 technology in action.
In Homer's epic, Iliad, Ajax (Aias in Greek but also known as, Telamonian Ajax or 'Ajax the Greater', to distinguish him from the smaller but lithe Locrian 'Ajax the Lesser'), was a mighty warrior, nearly unparalleled in either the Greek or Trojan ranks. A fitting name, then, for a technology that could prove as unstoppable in conquering the web as was Ajax in smiting noble Trojans.
Is it hubris to suggest that AJAX (Asynchronous Java and XML) will transform the web? Perhaps. But while Web 2.0 is a vaguely described vision, variably manifest depending on its interpretation, AJAX is a more concrete development platform that is already gaining traction on some of the most popular sites on the web.
In fact, AJAX and Web 2.0 are closely aligned, although they are not precisely equivalent. Web 2.0 is all about making the web more intelligent and interactive, building communities and encouraging collaboration. Web 2.0 doesn't prescribe how this vision is to be achieved, nor is it a development suite as such. Instead it's simply a vision that speaks of a new way of thinking about the web.
AJAX, on the other hand, is a collection of development tools that work together to make an individual web page more intelligent and interactive. In some sense AJAX does fulfil the Web 2.0 ethos of moving away from static web pages with fixed content and towards a more dynamic and interactive experience, but it doesn't propose to fulfil the entire lofty Web 2.0 dream.
This may even be the reason why AJAX has been gaining in popularity so rapidly - it's a real technology with achievable implementation rather than an abstract description of a future web utopia.
However, the principle of making web pages more dynamic and interactive is not a new one. So what is it that makes AJAX so great?
Hypertext
When the web was born from the mind of Tim Berners-Lee, it was to be a collection of online documents that would be interconnected through hypertext links. This vision was quite revolutionary at the time. Networks before the web were populated by isolated chunks of content with little interconnectivity. The web changed all this with its interlinked content all based around a common standard, HTML (Hypertext Markup Language), and this increased the informational value of the entire network.
This interconnectedness between pages was revolutionary, but the pages themselves remained static. In the early days of the web, a page was created offline and simply uploaded to the web server. Changes to the page required manual editing offline and for the new version to be uploaded and copied over the old one. This was fine for posting an essay online, but lacked interactivity and was also cumbersome to manage. It was soon realised that the web had far greater potential in terms of information and content delivery than merely displaying static pages.
The web slowly evolved through the 1990s to include more dynamism and interactivity on the front end, using things like JavaScript, ActiveX, and XML (Extensible Markup Language), and more intelligent back-ends, such as SQL (Structured Query Language) databases, CGI (Common Gateway Interface) and ASP (Active Server Pages). This lead to the other kind of ASPs (Application Service Providers) such as Hotmail or Yahoo Notepad, as well as other interactive features like online forums and web-based chat.
However, even with this increase in interactivity and dynamism, the web was still limited by its founding standard, HTML. The problem was that HTML was never developed with real-time interactivity in mind. Any change to a web page - such as entering and saving information in a form or viewing the next image in a slideshow - typically required the server on the back-end to compose a new page in HTML and download that to the client. This results in a somewhat frustrating experience where any change to the page requires a full refresh.
DHTML reloaded
In the late 1990s the first real answer to this demand for interactive pages arose: DHTML (Dynamic HTML). DHTML is not a standard as such. Like HTML, it is a method of combining conventional static HTML with JavaScript and CSS (Cascading Style Sheets) to make a web page appear dynamic. It does this by loading more information in the background than is displayed on the original web page. If a user interacts with a dynamic element, such as by clicking the 'next' button in a slideshow, the hidden data - in this case, another image - will be displayed on screen instantly. The beauty was that it didn't require the client to contact the server and request the image and reload the entire page.
DHTML proved useful, if a little fickle in its implementation on certain browsers, but it was hampered by one critical flaw. The pages only appeared to be dynamic. All the information was loaded into the background - which was fine if there was not much information to load, such as if there were only 10 images in the slideshow - but the page couldn't get more information from the server without needing to refresh the page.
This meant DHTML had limited utility, as most of the really exciting visions of interactive web pages required information to be sent from the server to the client without needing to refresh the page.