Got Web Ideas? Fishing for the Answers?
Think Outside The Code First!
Facts, Thoughts, and Opinions About Web Development and Business Strategy
Home Internet FAQ About OTC Contact Us Development & Consulting
Northern Pike, Conesus Lake, New York, Released, Fall 2007
Part III: Disadvantages of AJAX
Rob Taylor, Independent Developer & Consultant, TConsult, Inc. www.enginesforwebsites.com
Tuesday, April 01, 2008
In Part II we looked at a few examples of where AJAX can have a profound benefit to a Website. AJAX is effective in simplifying large data processes and can be used to make the user experience easier. However, you want to be aware of some of the disadvantages of using AJAX especially if you overuse AJAX.

Overuse
Using JavaScript site-wide just to eliminate a screen refresh is overkill. There are many who seem to be embracing it as a methodology that makes their Website slick and cool and will fill their users will awe. Such a philosophy has never worked on the Internet and it never will. End users don't care. They just want to get from point A to point B as quick as they can. Thus, if AJAX can enhance that process then use it. But using it just to use it is truly going overboard. AJAX is not hard to do but it is more work than normal server calls plus the additional burdens listed below.

Browser Compatibility
AJAX rides both ends of the Internet spectrum. While it introduces functionality that was hard to obtain in recent years, it also re-introduces a problem that many early Web developers struggled with - browser compatibility. AJAX can cause problems in certain browsers and in older browsers. AJAX relies heavily on JavaScript. JavaScript is not interpreted the same way by all Internet browsers nor their versions within. That means that things have to be written different ways to work in different browsers. This has always been one of the downsides of JavaScript.

JavaScript Must Be Turned On and Not Blocked
JavaScript must be turned on in the user's browser for AJAX to work and it must not be blocked by a firewall or Anti-Virus software package installed on a user's browser. While this usually not a major problem, it does happen. Many of the firewall and anti-virus tools on the market will block JavaScript if the security settings are set too high. You cannot rely on Web users to alter PC settings just to make your Website work. They will just leave.

Confusion
Internet users are trained to see that screen refresh as a sign that the Website is doing something. While there may be plenty of examples where not having it is a sound idea, removing it can also have confusing effects. You need to make sure that you implement additional functionality, such as a process dialog box, so the user knows that something is happening.

That being said, a dialog box is not always a nice fix. I recently visited a Website that used AJAX to display product details when you moved your mouse over the picture of an item. The page hung for a few seconds before the product information loaded. Adding a dialog box to a feature like this may not go over well. I will also add that such a feature is poor by design. Once again, this is a perfect example of using AJAX just because you can without any profound benefit to the end user.

Breaking Forms
Web Forms are built to take in to account the totality of the Web page when it loads vs. what it is when the user submits the form. Dynamically changing certain parts of a formed Web page and then expecting the entire Web page to behave properly at a later time within the same session may be a challenge. This has been a problem for .NET developers. The .NET framework is built to be smart so the developer does not have to write redundant code to validate forms. AJAX can distort the built-in form validation controls of .NET.

AJAX in Conflict with .NET
Not to harp on .NET but AJAX is in conflict with one of the basic problems that .NET solved - smarter pages that could sniff out postbacks to the server, only run the functions required, and return the user to the page without rebuilding the entire page. .NET remembers what was already done, changes the section that the user has altered, and returns the already drawn portion of the page with any new content. Of course, the screen will refresh and the page could carry extra weight if it is large in content. However, the latter is more the exception than the norm and the former is not an issue with Web users.

AJAX can also interfere with the same process that I mentioned above. Since .NET already has smart functionality built-in, AJAX can distort this by changing pieces of the pie that now put the page out of sync when posted back to the server.

Say Good-Bye to the Back Button
Since AJAX is seamless, you can say good-bye to the back button. AJAX features are not cached in a user's browser. Using the back button to return to a position in a multi-step AJAX implementation will not work. It will truly take the user back to the last page viewed - not the last thing the user did.

CPI Advertising Programs
This applies to the "overuse" crowd. Website owners utilizing CPI advertising need to understand is that the seamless nature of AJAX is going to cut down on ad impressions. Since the Web page does not refresh, neither will the banners. If you rely heavily on screen refreshes for ad impressions then those numbers are going to go down if you heavily implement AJAX in places where it is not needed.

So we must look at AJAX for what it really is, where its power is, and what the potential drawbacks are of using it, especially overusing it. I am all for AJAX but it is only a weapon. It not the entire war. It is not an nuclear bomb. It is a machine gun. While AJAX is very powerful and can make your Website more user friendly in precise scenarios, it is also not the "new wave" of Web development. In fact, it is a step backwards in many regards. I would also go as far as to call it more of a toy for Web developers than a viable solve all solution for clients and end users. Very powerful and useful in precise scenarios, but not a technique that should be overused.

Remember, end-users don't care. If AJAX can be used to enhance the end-user experience then by all means use it. But if your AJAX implementation strategy is to WOW users then WOW are you going to be disappointed and suffer a few bumps along the way. AJAX is the male enhancement tool of the modern day Internet. I will leave it at that.


More
Scrubbing the Floors with AJAX, But Just Scrubbing Tuesday, April 01, 2008
Part II: Examples of Where AJAX is Beneficial Tuesday, April 01, 2008



Customized Internet Solutions for Small Businesses and Corporations.
www.enginesforwebsites.com


© 2008 TConsult, Inc. - Engines for Websites
www.enginesforwebsites.com