AJAX - It is rocking
If you have not heard about this then you must be either deaf or still living in stone-age.
The one thing that many are talking about is AJAX (Asynchronous
JavaScript And Xml). But what does
this mean?
As far as websites are concerned, in the last decade we have made a lot of progress. Websites
has come a long way from mere static html pages to pages that are dynamically
built with data mostly coming from database and other servers using web services etc.
But one thing that many are not satisfied with is the user interaction that web applications provide
on the client side. When you click on a submit button, a request is sent to server and the entire
page is recreated with new data from the server. This process is slow and waiting is inevitable for users. The slower the network
the more user has to wait.
What is AJAX?
AJAX is all about making a request on the client using JavaScript to server asynchronously
without leaving the page.
Then a program (like a JSP or ASP.NET page) on the server receives the request and sends the data
back to client. The data is sent in the form of XML.
To develop AJAX based application , one should be aware of the following.
- Sound knowledge of Document Object Model (DOM) of HTML document
- Knowledge of JavaScript as it is used on the client to make request to server
- How to use XMLHttpRequest object as it is used to make a request to server
- XML processing. The data sent from server (JSP and ASP.NET pages) is in the form of XML.
So you have to know how to receive and process XML data on the client using JavaScript.
To be honest, that is quite a lot. Knowing DHTML, JavaScript and XML is not easy (at least for an average
programmer new to web world). But that's what you have to do to take advantage of AJAX.
Well, for those who take pain to learn all that I mentioned above, the most important benefit of all is the rich interaction (dynamic updates, drag and drop
etc) we can provide to end user without causing
the entire page to be repainted.
Some of the early adapters of AJAX are - Google Earth, Microsoft HotMail etc.
AJAX allows a part of the page to be dynamically updated without disturbing the remaining part of the page.
You can update currency conversion rates, stock prices without redrawing the entire page
on the client.
Possibilities seem to be unlimited.
ATLAS from Microsoft
As I mentioned, it is not easy to developed AJAX based web applications. It takes sound knowledge
of both server-side and client-side technologies. But don't lose your heart, Microsoft is there to make life easy.
Microsoft provides a framework called ATLAS for developing AJAX applications using ASP.NET.
ATLAS contains a set of controls that is very well integrated into ASP.NET. So all that
you have to know is ASP.NET and ATLAS to develop AJAX based websites.
Well there are already a lot such frameworks (DOJO etc) by open source people for quite some time.
Recently Sun has also initiated a project to integrate AJAX with JSP and JSF. The new projects are named as JMaki,
Dynamic Faces, and Phobos. Please read more about them at java.sun.com.
The advantage with these frameworks like ATLAS is they shield you from inner details. You don't
have to be aware of XML, JavaScript and DOM to develop AJAX application. Just use ATLAS and ASP.NET. For more details about ATLAS, please visit
atlas.asp.net
Change doesn't change
Many website are being redesigned to take advantage of AJAX. Yahoo
has released its MailBeta with
many features of AJAX. So, come 2007, I think there will be a lot of AJAXing every where.
I have been working with ATLAS and others for quite sometime. I want students to know about
this development in the industry. I am planning to conduct a workshop on "AJAX with ATLAS" for
those who know ASP.NET. I will provide details of that as and when I finalize date.
it is Diwali day. Clock is at 1:50 AM. I wonder at this time next
year what will I write about, what
changes will have taken place!. But for me AJAX seems to be a very good promise. From web application
developer's perspective, the next big challenge is creating web applications that provide
user interface that matches traditional desktop/windows application. Let us see how far we will go...
The only thing that doesn't change is CHANGE. Developing web application with
rich user interface is now-a-days being called as web 2.0.
Have anything to say about this blog, please provide your opinion using
Feedback Form .