Skip navigation
factory /><div class=

Basic AJAX Explanation

From Web Smart Newsletter: AJAX Website Applications
Originally published November 2005 - Updated July 2006. By Eric Holter.
print PDF email a friend
<<  1 | 2 | 3 >>  

AJAX Website Applications
1.AJAX Websites
»AJAX Explanation
3.AJAX Examples

Sign up to Web Smart:


| RSS
The critical contribution of AJAX

AJAX becomes critical as combinations of options grow. For example, consider the amount of data needed to select a car online. Multiply the number of vehicle types, by the number of manufactures, by the number of makes and models, by all years, by all the options like color, engine, drive, doors and so forth, and you end up with a long list of cars. Pre-loading such a list would result in an overwhelming download. With AJAX, just the first option is necessary. After the initial selection the server is called for the next set of options. The next choice calls the server again, further options are provided, and so on.

Without AJAX, the information is returned each time such database calls are made - along with all the other information needed to re-display the entire page including text, graphics, layout, and navigation. At every step along the way, each database call requires the response to return the entire modified page. That's a lot of unnecessary overhead and a lot of waiting for pages to update in between each set of choices.

With AJAX a page can ask for data from the server and get back just what it needs to update the page without reloading the whole thing.

Rise of the Next Generation of Web Applications

Desktop applications are great for activities that require real time processing and calculation. For example, as I write this newsletter in Word I get instant feedback in the form of squiggly red or green lines as I type. I don't have to refresh Word and wait for a reload every time I want to check my work. Because AJAX allows micro interactions between a page and a server without refreshing, a webpage can now function more like a desktop application.

There are already many web based applications. Online banking is a web application. Typical web applications pale in comparison to the speed and usability of desktop applications. Consider the process of updating a payee's mailing address when paying bills online. Suppose you're in the middle of entering payments when you discover a payee's address is incorrect. You click to the payee tab *refresh* select the payee *refresh* choose edit *refresh* make changes and save *refresh* click back to bill pay *refresh* and re-enter all the payments including the amount for the newly modified payee. That's at least five refreshes for a simple transaction like modifying a payee's address. When online banking implements AJAX we'll be able to edit payee information without ever leaving the bill payment page. That will be handy!

AJAX introduces significant speed and user interface improvements. A website can now function very much like a desktop application. As a result, an entire market of web based applications is now on the rise. These next generation web applications might not replace complex desktop applications like Microsoft Word with its real time spell checking--or will they?   next >

print PDF email a friend
<<  1 | 2 | 3 >>  
FACEBOOK


Comments


 Frank Scaturro July 29, 2008 11:43 AM
Can you ask Eric Holter this question...
By looking at the source code, how can I see if a page was created using ajax?
Frank
Scaturro@adelphi.edu
 Chris November 19, 2008 10:42 AM
Frank,

Thanks for reading. Because ajax is used in many cases to retrieve information from a database as a result of user interaction, it's typical that you wouldn't be able to see that information in the page source. However, sometimes what you don't see is indicative of ajax implementation.

For example, we noted that we used ajax in building the Village Visit tool for PlanUSA (http://www.planusa.org/contentmgr/showdetails.php/id/443460). If you mouse over the Ugandan village on the map, you'll get a short description (Visit the community of Nyalakot, in eastern Uganda). But, if you copy that description text and then search the page source for it, you won't find it. This is because it has been retrieved dynamically from the database as a result of your mouse-over. It did not initially load with the page.

Another way to discern that something like this is happening on a page is to view the source and see if a javascript library is being reference
 Brian May 11, 2009 10:28 AM
I just wanted to provide an update to this post.

writely.com was purchased by Google, turning it into Google docs.

You'll notice that writely.com forwards you to Google docs.