Microsoft and SUN Get AJAX

It looks like Microsoft is taking note of AJAX. The technology has been there for a while, but the idea took a while to catch on. I want to build some demonstrations for myself that I may post on this site soon. AJAX is an the idea that is taking hold, not a brand new technology.

There is already a good AJAX toolkit for the .NET framework you may want to try out. (Dig the use of a custom attribute.) My goal in this blog is always to talk above the technology, and not to get bogged down in too much techno-babble. Ignore the fact that I may be discussing the .NET implementation in the next few entries. There are implementations for PHP, Python and other languages as well.. The important thing is to get excited about is the basic concept.

Back when DHTML was just catching on, I got excited about the possibility of developing rich and interactive applications that run in the browser. I will not bother to recount all of the objections I encountered. I even started to build a prototype of what I had in mind at Blastradius. My product manager did not understand what we were trying to do, so he hired a friend to write a white paper that stated that our team did not have the expertise to build or design the products I was envisaging. Some people are just afraid to dream!

I would have liked to have had Guy Kawasaki as my product manager. His book, The Art of the Start has been called a weapon of mass construction. Give it a read.

Throughout this discussion, keep in mind that everything I say pertains to ‘web applications’ rather than ‘web sites’. This is an important distinction. Applications either perform a task, or they help people perform tasks.

Back to AJAX. One of the objections to the types of applications I wanted to build was they were heavy with Javascript. There is no need to load the whole page at once! However, there is a need to show the user a meaningful interface right away. How much code really has to be attached to a button? In practice, you only need enough code to get the code to service the button click. Rather than loading the whole application at once, you can load it as it is being use, just-in-time, as it were. (Slow loading does not have to be a problem.)

I also envisaged that remote messages could notify the application to refresh its code or content. More importantly, messages could be pumped out to users to notify them if the application is being taken off line. I see AJAX as a means to improve the quality of web application.

I was told that all of this chatter between the client and the server would take up bandwidth. I still think this objection is silly. What’s better? Refreshing the whole page every time a user presses a button, or only refreshing the parts of the page that need to be refreshed? I think AJAX could be used to decrease network traffic in web applications.

When I first saw the Microsoft .NET platform, I was pleased to see the behavior that was possible using the postback mechanism. I thought it was a good idea to abstract the client side from the server side and allow programmers to program an interaction without having to worry about where the code was running. However, I was disappointed to see that this was not achieved using remote communication with the server without reloading the page. Sun now gets it.

For a more theoretical, less anecdotal discussion of how these “Single Page Applications” can work, see Oliver Steele’s blog. This is exciting stuff. I prefer to think about the shortcomings of the technologies and approaches in terms of challenges that must be overcome rather than in terms of inadequacies that mean the technology will fail.



Leave a Reply