Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Ajax

AJAX... Why the Rush?

2.50/5 (4 votes)
27 Jul 2011LGPL34 min read 14.9K  
Don't use it just because it's trendy or because it can help you crank out quick interfaces for your sites and web based apps.

Recently, I've gotten into web programming with various languages, services, and frameworks surrounding the client side of the internet and I've recently stumbled onto AJAX and all its high-tech glory. I've been writing some cool applications for Chrome (packaged extensions) and add-ons for Firefox in order to cut my teeth with all the new stuff I've been learning and playing around with. After the first few applications, I started pondering the incentives and reasons for using AJAX and comparing them with the various drawbacks associated with the technology. After a few hours, I came to the conclusion that AJAX is immature and not suitable for most web applications. I didn't draw this opinion frivolously however.

I have several legitimate reasons for making this claim. The various reasons for this have to deal with: accessibility, necessity, and client support.

In regards to accessibility, I'd have to say that AJAX pretty much excludes any user with a slow connection or small bandwidth cap from accessing services in which it is implemented. The reasons for this are blatantly obvious. Continual data synchronization eats up bandwidth and for some, that's a precious resource that they can't afford to squander on your cool new "update every conceivable profile statistic imaginable" app. I'll have to admit, in certain instances, AJAX can be relatively lightweight and low in terms of data usage, however, most useful applications that require the use of AJAX often tend to need to request a lot of data at continuous intervals. This will become less of an issue as fiber optic and broadband services begin to reach areas that previously only offered dial-up and satellite based internet service, but still remains a concern for a sizable chunk of the internet audience.

Now on to necessity. AJAX is being used more and more to develop applications that don't really require its use and often times, don't even use the interface as it was intended to be used. I read an article somewhere that gave some excellent points regarding this issue and the example the author gave was on the site http://www.flickr.com/ which he cited as unnecessarily using AJAX scripting to update its comment system and provide change monitoring features. He went on to essentially recreate an example page showing how Flickr would work if it simply utilized HTML and JavaScript. He achieved nearly the exact same results with just a little bit of extra work.

Now, to the major reason why I think AJAX is immature: A huge portion of the internet audience uses technology that doesn't fully support or implement it correctly. Many people still use older browser versions, different Operating Systems, and even totally different platforms to access the web. This is more a concern to the mobile demographic as opposed to desktop users, but still applies to relatively large portions of each group much the same. As AJAX matures, and more and more people upgrade their systems/web access environment, this problem will virtually dissipate. However, I believe that we have yet to reach that point. Many sites are prematurely jumping the gun on this technology in that more and more are deciding to switch to this interface. AJAX definitely has its place, but I still feel that it has ways to go before it's ready to become a standard for web application development. There are often much better, faster, and more controlled ways to deploy such apps to the web audience that are better for what web programmers are trying to do. At this current time, embedded applications that use services like HTML forms, the JVM, and Flash are still the optimal choice for most application requirements.

Please note that I do realize that there is a place for AJAX on the web and that some applications conceivably need to use this interface in order to be deployed to the web in a reasonable amount of time. The thing is, AJAX is just a tool to accomplish a job (albeit an odd one) just like any other language or framework.

Don't use it just because it's "trendy" or because it can help you crank out quick interfaces for your sites and web based apps. Rapid application development should definitely be a consideration, but you also have to weigh in the demographics of your potential users.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)