Getting AJAX Just Right
Getting AJAX Just Right
We all know the old saying “When you have a hammer, everything looks like a nail.” This quote seems to perfectly sum up the current state of web application development. User interfaces that maybe have required 10, 20, or even 50 mouse-clicks and subsequent page refreshes a few years back now look like rich Windows or Mac OS native screens – with nary a page refresh in sight as the user interacts with the UI. The useful Ajax Patterns site (http://ajaxpatterns.org/Ajax_App) has a few questions you can ask of your site, in order to determine how extensive you will leverage this technology. According to to the site, some items to think through include:
• Will your app be “Ajax Deluxe” or “Ajax Lite”? In other words – is your app going to resemble a functioning thick client application in its use of state management and usability? If so, you may be facing an order-of-magnitude greater development effort, given the difficult of developing advanced AJAX functionality and ensuring it works across all necessary browsers.
• How will you treat browsers with insufficient technologies for Ajax? This may not apply to most intranet applications but definitely does apply to web-facing applications. Are you prepared to turn users away and potentially use customers if they are not running a compliant browser?
• How much processing power will be required of the browser? This is a hidden issue that affects many apps that heavily leverage AJAX. The fact is that JavaScript is horribly slow compared to server-side code execution, although recent releases of browsers such as Firefox 3.2 aim to improve JavaScript execution speed. At any rate, if you are performing heavy DOM and data manipulation on the client, performance is something you need to plan for.
At the same time, in today’s marketplace, it is possible to use too little AJAX as well, particularly if you are offering features that visitors have come to expect will utilize AJAX functionality. This might include online mapping, type-ahead lookup functionality in search boxes, and any sort of drill-down data exploration mechanisms. If your site requires a page regen on the server after every mouse-click or submit and your competitors do not, you will be at a disadvantage and may end up losing customers to your competitors, thanks only to the user interface functionality alone. The best recommendation at this point is to think creatively and identify a Top 3 or Top 5 areas in your app that could leverage AJAX in order to make your app more usable. If those are successful and customers respond positively, look into carefully adding in AJAX functionality one feature at a time, as the UI demands it.