Text Link Ads

Friday, June 8, 2007

AJAX Explained

by Adam Losier

I cannot express how much I really LOVE AJAX. I have been a web developer for the past 8 years and I have to say that microsoft's Asp.net 2.0 has made working with AJAX so much easier then what it used to be. For those unfamiliar with what AJAX stands for it means "Asynchronous JavaScript and XML", AJAX was officialy coined in febuary 2005 by Jesse James Garrett however there has always been various formats of AJAX like Microsofts Remote Scripting, commonly refered to as MSRS.

Basicly AJAX is a technique for creating interactive web applications, it is meant to increase a webpages interactivity, speed, and usability. AJAX has a couple of pros and cons, the pros are Bandwidth Utilization and Interactivity while the cons are usability (back buttons and bookmarks), search engine optomization, and responce-time. However in my opinion the responce-time is more of a pro then a con.

To really understand what AJAX is used for you need to understand the relationship between the Web Server and the Client Browser, but here is an example that any average joe can understand.

Bob lives in Canada (The Web Server) and he travels to France where he meets up with a friend (The Client Browser), Bob's friend asks him if he can show him a picture of his new car (This would be something like clicking on a button in internet explorer), if AJAX was not avalible Bob would have to go all the way back to Canada (Where the web server is) grab a picture of his car and then go all the way back to france to show his friend, but if AJAX was avalible in this scenerio then Bob would just simply reach into his pocket and show his friend the picture.

This scenerio is very basic and does not show the true power of AJAX, here is an example that will show you how much more important AJAX can be when building a webpage.

Sally visit's her favorite knowledge resource (Also known as Helium) and starts to write her very own article, the article she is writing has a limit of 1000 characters and everytime she types the specified number of characters decreases until she reachs the limit. If there was no AJAX present every single time Sally pressed a button on her keyboard the page would refresh (Press F5 to see what a refresh is) so that the numbers can decrease, however with AJAX everytime she types the numbers are automaticly decreased without a refresh.

As you can see from the above example without AJAX Sally would get very annoyed, very quickly because she would have to wait for the page to reload everytime she hits a button on the keyboard. This is the true power of AJAX and even though these examples are very basic in showing what AJAX can be used for, just know that without AJAX interactive webpages would be very difficult to make and you as the user would not get all the goodies you see on the web today.

For some examples of passionate writing styles and how easy it is to write your own short articles go to http://tinyurl.com/yc4aa3 and browse some of the articles by Adam Losier, he is passionate about the things he writes about and you can learn some good ideas from his work.

No comments: