AJAX: The Future of the Internet?

Unless you’ve been living in a cave or maybe Ratanakiri, then you have no doubt heard the term AJAX (Asynchronous JavaScript and XML), but is it all just hype and a cool sounding name given to a process that has been going on for years? Or, is it going to revolutionize the way websites behave and make Web 2.0 do everything that it said on the box?

Well, as is the case with any hotly contested debate, the real answer is yes and no, the actual acronym AJAX is a bit of a buzz word as it is used as a catch all term for all asynchronous browser->server communications even when the response output from the server is plain text or JSON, which effectively takes the X out of AJAX. That covers the ‘no’, on the yes side once we move away from arguments over semantics and get down to basics, AJAX is going to change the way in which we surf the web and this change will be one of the biggest switches in how we access media since the invention of the television. We are now moving from the generation of the web page to the dawn of the web application.

At present we use websites by going from page to page, we look at one page, get the information or media we need then go to another page. Each time we move between pages the screen is cleared and the new page is loaded. This approach is extremely effective for content/article based websites, it’s just like turning the pages in a book and this intuitive approach is not surprising considering the aims of the internet's founding fathers. Now at the dawn of the Web 2.0 the direction the web is heading has shifted dramatically. Users now want true interactivity, user generated content and web apps that perform complex tasks that share more characteristics with desktop software than they do with electronic magazine type sites that were the bread and butter of Web 1.0. People have been talking about interactivity and software type web apps for years but until the release of Google Maps Beta none had ever truly come up with the goods in all departments.

The XMLHttpRequest object which handles asynchronous communication with the server has been around since the release of Internet Explorer 5 in 1999, JavaScript and XML which make up the remaining letters in AJAX have been around a lot longer than that. So why did it take nearly six years for these technologies to be put together and the AJAX revolution to begin? The answer lays in what I feel that AJAX should have really been called AJDA(XML||JSON||Plain Tect)??!

Anytime AJAX is discussed anywhere some self-important know it all will wade in and recite the anti-AJAX mantra “I have been doing exactly the same things with hidden frames for years before the buzz word AJAX was ever dreamed up”. Then use this as the base for their argument as to why they think developers who are focusing now more on JavaScript than server-side technologies will soon be unemployed. These people are ignored for the most part as we all know what happens in the development world to old dogs that can’t or won’t learn new tricks; they become project manager or better yet get employed by Microsoft. But all joking aside, what they are saying is correct and we have been able to communicate with the server without a page refresh for a long time now, but what they forget to mention is the reason that until now it was only done once in a blue moon for form validation or cheap tricks, and why now it’s being used for full blown web apps like Google Maps: That reason is the document object model.

Prior to serious implementation of the W3C recommendation for DOM level 1 in IE6, we could get information back from the server using XMLHttpRequest. The problem was what to do with that information once it arrived? In order to change the structure of the page in any *meaningful way* we would still needed to refresh the page so it could be parsed again, this defeats the whole purpose of asynchronous communication. By 2004 when DOM level 1 enabled browsers were being used by close to 90% of surfers, it was no coincidence that right about this time we started to see the first serious attempts at harnessing the power of XMLHttpResquest through the DOM.

Document Object Model (DOM) is a description of how an HTML or XML document is represented in a tree structure. DOM provides a structure that facilitates access to the elements of an HTML or XML document by scripting languages with object oriented features (e.g., JavaScript).” src=”Wikipedia”. In short we could now use JavaScript to access, edit, create or delete any HTML node contained within the DOM tree, effectively handing us the power to change anything on screen without the page having to be refreshed. This combined with XMLHttpRequest made the previous visions for browser ready, standards compliant web applications possible.

 

Where are we now?

We are at the very beginning, over the last two years we have seen the first serious AJAX based websites rolled out, most are still in the Beta stages as developers find their footing. Many web developers are still finding it difficult to move their way of  thinking in terms of the server client relationship from the previous synchronous ‘paint a page’ world of browser reloads, to the new asynchronous world which is more akin to software development than traditional web design.

 

In my opinion, where is all this heading?

Within the next ten years we are going to the average internet connection speeds increase exponentially. Remember when everyone thought that a 1Mb/s connection was insanely fast, not that long ago hey? Well check this out, a 2Gb/s connection is already a commercially viable reality being accessed by 20,000 Londoners. With the continuing massive reductions in the cost of fiber optics and these massive increases in internet speeds and reliability of service, it won’t be long until home internet connection speeds can keep pace with your internal wired network or maybe even your hard-drive! This is when we’ll see the scales tip in favor of web based software over traditional CD based distributions.

This agenda will be pushed aggressively by the large software companies who aim for home computer users. It will make software piracy a thing of the past, and the internet, which due to piracy was predicted to be their downfall will in fact become their savior. The business model for software companies will shift from direct sales to service agreements where by users pay monthly access fees for software in plans similar to those used so successfully in mobile telecommunications.

To begin with we’ll see the browser increase in power as they move to implement the growing number of recommendations from W3C. We'll then see a void for a time where by browser technology has failed to keep pace with the speed of growth in internet infrastructure and user demands for more powerful web apps. During this time I predict we'll see the increased use of downloadable interfaces used to access the web app in place of the browser. Google Earth (not to be confused with Google Maps) is an early example of this type of system in action. Over a couple of year period the browsers will catch up and will be flexible enough to handle complex web apps of all flavours. At this point we’ll have a similar situation to the one we have found ourselves in today where the large player(s) have invested too much money going in their own direction to simply jump to standards compatibility. Then my guess is we’ll all be talking about Web Standards 3.0!

In the end I doubt any of us will own software or even a hard-drive for that matter, everything will be stored at central points and you will be able to access your the equivalent of your personal operating system containing all the software you are subscribed to from any internet connected terminal on Earth. AJAX in my opinion is not just hype, and in the future will be remembered as the first step on the journey which resulted in the internet's true coming of age.

 

AJAX Sites

Here are a few sites that are built around AJAX to give an example of what developers are doing now:

PageFlakes – An online tool to manage your favourite web content.

Live Local – If you think Google Maps was cool, check Microsoft’s offering!

Kiki – Kiko is an online personal calendar system.