When to use AJAX programming?

AJAX (Asynchronous JavaScript and XML) is being used almost everywhere, but when should you apply AJAX programming to your own applications?

March 14th, 2007 at 5:00am — Comments: (2) — By: Jonathan Danylko — Tags: AJAX

For most developers, AJAX web development is a rush, because it's a relatively new way of creating web applications. It actually blurs the lines between a desktop application and a web application.

Bu when should you use it? and why?


This would be the primary reason for using AJAX programming. Users are always looking for easier ways to assist them with data entry.

Validations of forms can occur on the server side instead of using DHTML and JavaScript on the client. It's also better to control the server-side scripts instead of the client-side JavaScript.

Additionally, if you had cascading dropdowns and one changed, the other would make an AJAX call and update the second dropdown accordingly.

This is a double-edged sword. The advantage is that you have a streamlined application for your user and they visually see the benefits immediately. Check the disadvantage below for the downside.

Instead of an entire page refreshed, you encounter a particular piece of the screen updated. This also provides a lower bandwidth requirement.


As with everything, the bad comes with the good.

Server Capacity
Can your server handle the double requests? Depending on how you structured your web application, you may have a single page sent back to 1,000 users, but all of your users may make a total of 2,000 AJAX calls to the server.

How can you have an advantage and a disadvantage for the same reason? Based on what I've seen in the past with companies who created AJAX-designed sites, there were issues and ramifications involved with using said site.

Diverse AJAX Frameworks
Last time I checked, there were so many AJAX web development frameworks available, it's almost like the proverbial "needle in a haystack" when matching a framework to a developer or company's style. Reviewing each and every AJAX Framework available would be an entire website altogether.

SEO (Search Engine Optimization)
With the recent news about USAToday.com moving towards a new AJAX social model, they are actually sacrificing search results from the bots. Yikes!

Sooooo....when do I use AJAX?

I understand there are more disadvantages than advantages, but the answer to this question in this post is simple: Only use AJAX on Intranet applications. If your company allows AJAX to be used internally and selected a standardized AJAX web development Framework, by all means, use AJAX programming to enhance your applications.

Obviously, your company is smaller than the Internet (unless you're Microsoft), so you're catering to a smaller audience and providing a better user experience using AJAX in your applications.

However, that doesn't mean you have carte-blanche to disregard any of the topics discussed above just because you are writing an Intranet application.

The only issues I see with adding AJAX programming to an Intranet application are the usability factor and the server capacity. If you can solve those two problems in your Intranet application, you're golden!

Picture of Jonathan Danylko
  • Jonathan Danylko Twitter Account LinkedIn Account Facebook Account

Jonathan Danylko is a freelance web architect and avid programmer who has been programming for over 20 years. He has developed various systems in numerous industries including e-commerce, biotechnology, real estate, health, insurance, and utility companies.

When asked what he likes doing in his spare time, he answers..."programming."

Related Posts


  1. July 27th, 2008 at 8:53am
    great post.

    Hey guys, we are going to launch a 100% AJAX social networking site in Oct 08. Can we invite you to be our beta tester? Please see attached URL for more information. Thanks,

  2. Ian McLachlan
    March 20th, 2009 at 7:51am
    This is the dumbest piece of crap I've read this week.

Post a comment