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.
While working for Canadian Forest Products, I used Microsoft’s remote scripting toolkit to provide instant updates to a database from a browser without pressing a submit button, or reloading the page. Users of the application entered both a price forecast and a production forecast; therefore, it was possible to calculate a revenue forecast on-the-fly. Users could view the revenue forecast when they let the mouse hover over a cell in either the price forecast or the production forecast screen. Using remote scripting, the revenue forecast would update the moment the cell was edited.
Users liked this behavior. I recently used similar techniques while building a project management application for my client at PWGSC. I have a lot of ideas about these techniques, and about some of the new toolkits and approaches that are becoming popular these days. See AJAX and SAJAX. The techniques used by AJAX are not necessarily new, but there is a furor of discussion about this technology. Does AJAX break the MVC paradigm? Does AJAX violate accessibility guidelines? These are all good questions.
I like disruptive technologies. As a child, I enjoyed snow storms. I enjoyed the major power blackout of 2003. Anything that upsets the apple cart is fine with me, even if it is my apple cart. I like change, and I hate complacency. That is my instinct. I like to see people challenge those who have become smug and certain, and I try not to become smug and certain myself. I will write about AJAX in the near future.
Someone once said, “Don’t worry that people are going to steal your ideas. If they are any good, you are going to have to shove them down their throats.†Stupid people are impervious to good ideas, and they are attracted to bad ones. Whether resisting good ideas or arguing for bad ones, truly stupid people rely heavily on bafflegab and blither. Truly stupid people do not know that they are stupid, and they probably agree with everything I have to say about them. However, they think I am talking about someone else.
The smartest people I have ever known have been able to express their ideas in simple language, and I try to do the same. Smart people question themselves as a matter of course. Smart people are entertained by their own mistakes. Being wrong is part of the process. Not being afraid to make mistakes is a prerequisite to success.
Contrary to what one might think, stupidity is not an impediment to advancement. Stupidity is an auspicious characteristic for those who want to get ahead. A lack of credentials can kill you, but stupidity will never hold you back. Perhaps the truly stupid rise to high positions precisely because they are too dull witted to imagine a goal more worth pursuing than power and prestige.
Once, I worked with a product manager who opposed my every idea. I asked him why, and he said that he was afraid. Either I was a genius, or I was wrong. If I was wrong, he knew that he had to oppose me. If I was a genius, he knew that I was dangerous. Either way, I had to be stopped. Needless to say, he stopped me. I made the mistake of ignoring him and concentrating on the work.
I have never tried to achieve power. Hence, I write cranky rants about stupidity. I am tempted to ask myself if this is the best use of my time, but it is probably best not to over-think it. I doubt that I am a genius, but I am clever enough not to dwell on this. What can come of it?