Wednesday, September 28, 2005

Web Applications and AJAX






All these days I have been listening about AJAX. I knew that it had to do something with web based user interfaces. I also knew that it stood for "Asynchronous JavaScript and XML", and.....well, that is pretty much it. I knew that I have to get my hands wet and try this new thing out. But I have to wait for my 8th semester exams to get over before I can actually do that.

So I thought let me find out a little about it.

Before I can actually talk about AJAX, I will have to digress and give an overview of web based user interfaces, becase they are what I think AJAX is really about.


Web Based User Interface


Soon after I worked on my BE project "Network Management Tool", I totally fell in love with web based interfaces. The ubiquity of the common web browser, and the ability to update and maintain web applications without distributing and installing software on potentially thousands of client computers have really made web applications and web based UI's popular.

Add to that, the fact that arguably the best company in the computing business is showing a very keen interest in this, everybody is going ga-ga over web based UI's. And there are pretty good reasons for moving software on to the server and provide a neat user interface using your favourite web browser (apart from the reason I mentioned). It is not just about being able to access your application from any operating system or platform, it is about doing away with things like installing software on your machine to be able to use it. All the dirty stuff is left behind at the server, while the user need only think about the application.

Let me give you an example. Launch your favourite web browser, type www.gmail.com . Enter username password and login. Congratulations, you just installed google's email client on your machine. You see what just happened? This seemingly trivial thing lets us check our email from any machine on the planet that is connected to the Internet.


Web mail seems to be such a trivial thing to us today that we dont normally think about the real genius of an idea behind the whole application: perfect portability. Move around anywhere, use any computer, any operating system, and you can still use the web application. You dont even need to be using your PC for that matter. Anything that can access the web using an XHTML compatible browser is good enough.


Extend the concept a bit, and you got things like Google Calendar and Microsoft's Hotmail Live where you can manage your entire schedules online. The possibilities are limited by our own imagination.

Okay, at this point I can digress and talk about how this seems to be a threat to rich text clients and why Microsoft is not happy about that, because it threatens Microsoft's core strength: The Rich Client.

Let me do that some other time where we can talk about the business use and the market aspects of this application design paradigm.

Anyway, this does not signal the end of the rich client so soon. Desktop applications have a richness and responsiveness that web based applications have not been able to deliver. Web based applications are simply not fast enough.





Reason? In the classic web application model, the user enters some data. After performing error checks, that data is sent to the web server in an HTTP request. After the server performs the back end processing, like running some algorithms , fetching data from a database, generating outputs, the results are sent back to the client in an HTML page.

Quick question : while the server does all this, what does the client do? Yes, you got it right: the client waits. From what we have read in Roger Pressman's book on software engineering, this isnt quite the best way of developing a user interface. Something needs to be done about the delay, so that the user doesnt have to wait everytime the client needs to fetch something from the server.

Enter AJAX

So what does AJAX do to help the situation for our web based interfaces?

TO BE CONTINUED.....


Web Applications and AJAX

All these days I have been listening about AJAX. I knew that it had to do something with web based user interfaces. I also knew that it stood for "Asynchronous JavaScript and XML", and.....well, that is pretty much it. I knew that I have to get my hands wet and try this new thing out. But I have to wait for my 8th semester exams to get over before I can actually do that.

So I thought let me find out a little about it.

Before I can actually talk about AJAX, I will have to digress and give an overview of web based user interfaces, becase they are what I think AJAX is really about.

Web Based User Interface

Soon after I worked on my BE project "Network Management Tool", I totally fell in love with web based interfaces. The ubiquity of the common web browser, and the ability to update and maintain web applications without distributing and installing software on potentially thousands of client computers have really made web applications and web based UI's popular.

Add to that, the fact that arguably the best company in the computing business is showing a very keen interest in this, everybody is going ga-ga over web based UI's. And there are pretty good reasons for moving software on to the server and provide a neat user interface using your favourite web browser (apart from the reason I mentioned). It is not just about being able to access your application from any operating system or platform, it is about doing away with things like installing software on your machine to be able to use it. All the dirty stuff is left behind at the server, while the user need only think about the application.

Let me give you an example. Launch your favourite web browser, type www.gmail.com . Enter username password and login. Congratulations, you just installed google's email client on your machine. You see what just happened? This seemingly trivial thing lets us check our email from any machine on the planet that is connected to the Internet.

Web mail seems to be such a trivial thing to us today that we dont normally think about the real genius of an idea behind the whole application: perfect portability. Move around anywhere, use any computer, any operating system, and you can still use the web application. You dont even need to be using your PC for that matter. Anything that can access the web using an XHTML compatible browser is good enough.

Extend the concept a bit, and you got things like Google Calendar and Microsoft's Hotmail Live where you can manage your entire schedules online. The possibilities are limited by our own imagination.

Okay, at this point I can digress and talk about how this seems to be a threat to rich text clients and why Microsoft is not happy about that, because it threatens Microsoft's core strength: The Rich Client.

Let me do that some other time where we can talk about the business use and the market aspects of this application design paradigm.

Anyway, this does not signal the end of the rich client so soon. Desktop applications have a richness and responsiveness that web based applications have not been able to deliver. Web based applications are simply not fast enough.


Reason? In the classic web application model, the user enters some data. After performing error checks, that data is sent to the web server in an HTTP request. After the server performs the back end processing, like running some algorithms , fetching data from a database, generating outputs, the results are sent back to the client in an HTML page.

Quick question : while the server does all this, what does the client do? Yes, you got it right: the client waits. From what we have read in Roger Pressman's book on software engineering, this isnt quite the best way of developing a user interface. Something needs to be done about the delay, so that the user doesnt have to wait everytime the client needs to fetch something from the server.

Enter AJAX

So what does AJAX do to help the situation for our web based interfaces?

TO BE CONTINUED.....