Friday, August 25, 2006

Clorox won't make the web any better... but AJAX will!

In 1995 Netscape hired Brendan Eich to take charge of a development project in which they were creating a new programming language to add interactivity to web pages.  This language was called LiveScript by the developers because of its ability to change itself and web page content.  Later, when the language was released to the public, it was announced as JavaScript.  As it turns out, this was a change that didn't make much difference to the marketers who made the decision, but have made things very confusing for up-and-coming web developers ever since.
Just following, the eXtensible Markup Language (XML) was developed in 1996.  Simply put, XML is a markup language (not a programming language) that is used to define and describe data. 
While these two languages have been around for quite some time, it has only been during recent years that people have discovered the potential made possible by combining them.
By combining JavaScript, a primarily web-based programming language, with XML, which is used to define and describe data, it is possible to dynamically access data and data descriptions over the web.  This method of combining these two is known as AJAX: Asyncronous Javascript + XML.  Now, I know that sounds like a lot at once, but take a look at our example and you'll see how easy it can be.
In order to demonstrate how cool AJAX can be, I created an AJAX-based Instant Messenger (click here).
Notice that when you post a message, or receive one, the window does not refresh; there is no "post back".  This is because every time you send a message, there is a JavaScript that is dynamically creating a new browser instance with which to send the message.  It then receives an XML response with all of the current messages that have been posted.  Feel free to dig around in the source code.
The term "Web 2.0" is being used to describe where we are headed once all web-based applications are using AJAX to interact with users.  Imagine the possibilities...

No comments:

Post a Comment