Putting AJAX to work

For enterprise apps, asynchronous JavaScript and XML offers more than just UI razzle-dazzle

It's easy to see why AJAX (asynchronous JavaScript and XML) has captured the imaginations of so many Web developers. For the first time, browser-based UIs are rich and full-featured enough to do away with so-called thick-client desktop applications.

At first glance, AJAX may seem best suited for consumer-facing applications. Google Maps, Yahoo's Flickr photo-sharing site, and Amazon.com's A9 search engine are all fine examples of how AJAX can add some glitz to a Web site's UI. For enterprise applications, however, it can be difficult to see how AJAX can provide enough real benefit to offset the risks involved in adopting a new, complex form of Web development.

But IT managers should be careful not to write off AJAX completely without a deeper look. Indeed, the same technologies that can add fun to consumer apps also have a serious side. And as a handful of companies have already found out, that side can be one that greatly benefits IT when tapped correctly.

The IT team at Tupperware Mexico, for example, first turned to AJAX when it tried to implement an online ordering and inventory tracking system that mimicked one built by their counterparts in Australia. The Mexico team, however, found that it didn't have the resources to run the application.

"We have only one T1, one server," says Liborio Longoria, technology manager at Tupperware's Mexico sales office and plant. To make matters worse, the T1 has to handle the traffic of 40 to 50 internal users simultaneously, plus that of dozens of distributors trying to log on to the system.

So, when Luis Derechin, CEO of AJAX development tool vendor JackBe, called out of the blue and told Longoria about AJAX, the harried technology manager was ready to give it a try.

AJAX encourages developers to split Web pages into compartments of data that can be refreshed independently of the entire page, and to write applications that act on data within the browser rather than on the server. After all, why should a browser ask a server to run a simple task when the browser has enough processing power to do the job itself? The result is that considerably less data and display information has to travel over the network.

Within months of starting to use JackBe's tools, Longoria's team had a system that ran efficiently on just one server. "I think our customers are happy, or at least satisfied, with our service," Longoria says. "We do order entry, billing, account receivables, promotions, inventory -- and we get 200 orders per week, per distributor, sometimes with all of them in the system at the same time. The reply still is good."

Use of AJAX to reduce network traffic is spreading fast, especially in regions where customers and clients aren't always able to access applications over broadband connections. During the past two years, JackBe has helped more than a dozen Latin American companies roll out AJAX-based applications. These companies aren't small, either: Banamex, Cemex, and Sky Latin America all use AJAX.

Click for larger view.

Best of both worlds

Another benefit of AJAX -- beyond more efficient networking -- is that it makes deployment of zero-footprint software possible. Rather than installing a copy of an app on each and every desktop in an office, IT staff can maintain the code in one place and deploy it over the Web to anyone who wants it. Likewise, bug fixes and software updates can be rolled out to every user automatically.

Enterprise application vendors have been promising this vision to their customers for years, but the limitations of traditional HTML and JavaScript interfaces have made it difficult for Web-based applications to compete against desktop software. It's no surprise, then, that some of these same vendors are among the first to push the boundaries with AJAX.

Scalix, for instance, a vendor of Linux-based messaging and calendaring products, uses AJAX to add desktoplike features to its online server-administration tool and Web-mail interface. Indeed, the latter, called Scalix Web Access, is so similar to modern desktop e-mail clients such as Outlook and Thunderbird that it's easy to forget you're using a Web-based application. Users can re-sort their inboxes, view messages in a preview pane, and browse messages in different folders -- all without the tedious page refreshes that you might expect from other Web-mail interfaces such as IBM Lotus Domino WebMail or Microsoft Outlook Web Access.

"It's the best of both worlds," says Scalix CTO Andy Palay. "From the user's perspective, it doesn't have these major transitions from one state to another. From an administrator's perspective, it has this wonderful feature where I don't have to worry about installing software on every computer."

The story is much the same at NetSuite, a provider of hosted business apps. The company was built on the idea that small and midsize businesses can save money by trading in-house CRM and ERP software for hosted services. But to convince customers to give up their rich desktop apps, NetSuite had to offer a Web application that could do all the same things at nearly the same speed.

That's where AJAX comes in. By compartmentalizing the various data sets displayed on the dashboards that customers use to access the CRM database, NetSuite was able to add desktoplike features, including in-line editing and instant list re-sorting. The dashboard now feels like "an application that we built, rather than a Web site," says Mini Peiris, senior director of product management at NetSuite. "Being able to leverage AJAX is great. Our dashboard is definitely a competitive advantage for us."

Just as JackBe helped Tupperware Mexico, both Scalix and NetSuite are using AJAX to decrease server load and network traffic. For Scalix, it's a selling point: Customers may be more interested in buying the company's products if they see that they're easier on the network and place less burden on servers than competing offerings. For NetSuite, it's a means of keeping the company running efficiently even as its customers scale up operations.

NetSuite users, for example, can re-sort lists all they want without hitting the company's servers or hogging bandwidth because that functionality is handled completely within the browser. Likewise, when a data point changes -- say, when a salesperson edits a customer's phone number on one of NetSuite's dashboards -- the application only has to send the number to the server and retrieve an updated list. In fact, under NetSuite's architecture the application doesn't even have to retrieve the full list because portions are loaded dynamically as the user scrolls through them.

"It really was about optimizing performance for our end-users and for our servers," Peiris says. "You really want to have an interactive experience, and you want that to be as high performing as possible without putting a heavy load on the server."

Tools and tips

For those willing to give AJAX a shot, a number of development tools are available. As of this writing, Backbase, JackBe NQ Suite, and Tibco General Interface are the most advanced commercial products in the space -- though each comes with a hefty price tag (see table, "AJAX Developer's Toolkits," above).

Not to be left out, both Microsoft and Sun Microsystems have released early-access versions of their own AJAX development tools. The Ruby on Rails development framework is another mature tool, and it offers the additional attraction for many developers of being completely open source.

Whatever tools you use, keep in mind that creating desktoplike applications entails design challenges that Web developers don't normally confront. For example, users have become accustomed to using the Back button to revert to the previous state of a Web page. For AJAX-enabled sites, however, the Back button might unload the entire application unexpectedly. Depending on the nature of the application and its audience, some users may have a hard time adjusting.

Scalix's Palay says his team disabled some browser buttons for exactly this reason. "We present Scalix Web Access and the [administration] console as desktop applications. When you run them, the window you get has no browser controls," he says.

NetSuite's developers made similar considerations, Peiris says. They settled on a design that splits up major sections of the application over several "pages" so that users can use the Back button to jump between them. "You can still use your Back button effectively," Peiris explains. "If you're on the leads dashboard, you can hit Back to get to your sales dashboard."

Jesse James Garrett, director of user experience strategy at Adaptive Path and the originator of the AJAX acronym, says he believes users will learn to adapt to new interfaces, provided that the interfaces are designed intelligently. "There are lots of ways in which interaction on the Web five years ago was different from the way it is today," he says. "From year to year, you can see the evolution of those conventions, and users have adapted to that just fine."

One other note about developing AJAX-based applications: Don't try to slip AJAX into a product just because it's the latest technology. As ZapThink senior analyst Ron Schmelzer puts it, AJAX by itself isn't a differentiator. No doubt anyone who tries to sell AJAX-based products -- or any developers who propose using AJAX in-house -- will still have to prove that their implementation actually does something worthwhile.

"AJAX by itself doesn't mean anything," Schmelzer says. "You can say, 'Hey, I've got AJAX,' but the response is going to be, 'OK, but what does your product do?' "

Given the benefits of AJAX -- both for the front end and in the back office -- Schmelzer says it won't be hard for a lot of companies to come up with products that use AJAX wisely and in innovative ways. In fact, he says he sees uses for it everywhere he looks. "A lot of the next versions [of applications] that people will buy -- a lot of those versions will have AJAX based interfaces," he says. "By this time next year, AJAX will be everywhere."

Copyright © 2005 IDG Communications, Inc.

How to choose a low-code development platform