The popularity of applications such as Google Maps and Flickr has Web developers flocking to the technologies that make these rich, interactive programs work. But industry watchers caution the Web scripting components known collectively as AJAX can be more complex - and less network friendly - than they might first appear.
Google wasn't the first to exploit these technologies, but the company did so in a massive scale and in a very public way. Amazon's A9.com search engine also makes use of AJAX-style development, as does photo-sharing site Flickr.
The corporate role
Increasingly, corporations are considering the role AJAX technologies can play in businesses that aren't catering to millions of consumers. Industry experts say there's a place for AJAX in the enterprise, but IT staffs need to evaluate and implement the technologies in a prudent way.
The first step is assembling a cross-functional team, says Joe Skorupa, research vice president at Gartner. It's important for companies to get Web developers together with IT staff who know about security, database design, server administration, networks and desktop administration, he says.
Developers need to design AJAX applications from the start to account for the number of TCP connections that could potentially be open at any one time, as well as the effect of continuous content refreshes on server loads. Adequate prototyping and testing are imperative, he says. "If you do that, you can come up with some cool stuff that will delight your users."
AJAX is less about any single technology than it is an approach to developing applications that are more responsive than typical HTML pages. One of the most-appealing features is that AJAX applications don't require plug-ins or other code to be installed on client machines.
Instead of using the familiar page-submit/page-refresh model, AJAX applications keep content current by refreshing only the parts of the screen that have changed. In addition, AJAX applications use the power of the user's PC and Web browser to perform many of the tasks that traditionally are done on a server. For example, a user can sort data or edit tables without sending or receiving data from a server.
Companies are looking to incorporate AJAX technologies into new and existing software programs. For instance, a company could revamp a Web application by adding real-time updates of such data as account balances or inventory levels. Instead of a user having to request this information, a developer could design the application to automatically poll a server for changes every 15 seconds, or go looking for an update every time a user moves a cursor over the data field.
But it's not always easy to add AJAX elements to an existing Web application. It depends how entwined the application logic and presentation layer are. If they are distinct, a developer may have to modify only a small percentage of the application code base.
"We've seen instances where they are separate enough that it's extremely easy to do. Even a client/server application could have been developed under an n-tier infrastructure," says Luis Derechin, CEO and cofounder of JackBe, which makes AJAX toolkits and infrastructure platforms. "Other times, it's so embedded that it's a mess."
Another factor driving corporate interest in AJAX is the chance to move client/server applications to the Web. Companies can mimic the features and look and feel of a client/server application while gaining the management and administration benefits of a Web application, says Ted Farrell, chief architect for application development tools at Oracle.
"People have started missing their old desktop clients, where things really were interactive and dynamic," Farrell says. "So more push has been made to keep the single distribution model of the Web, so companies don't have to go through the hassle of distributing software to everyone's desktop, but still get the rich interaction associated with a desktop client."
Another key feature attributed to AJAX applications is their ability to reduce the network load compared with traditional Web applications.
In theory there should be fewer round trips to the server and more client-side processing of the information if programming is done well, says David Boloker, CTO of emerging technologies at IBM. "If you're sending down XML and then the client works on the XML, as long as you're not continuously sending little bits of XML up and down, the server is going to have a lot more cycles free," he says.
Gartner's Skorupa agrees. "Well-coded, well-structured AJAX applications can improve responsiveness, because you can do incremental updates to the screen, rather than pulling everything down, which can reduce the number of round trips," he says.
However, some of the things Web developers are doing with AJAX to make applications more responsive can have a negative effect on network performance, Skorupa says. For example, if there are 10 embedded links on a particular screen, developers use AJAX technologies to open all 10 links and download the information even before a user requests it. "Just in case you might want it, it will be there," he says. "That could put a whole bunch of extra load on the network."
Such pitfalls are dangerous. People have a tendency to think AJAX is easy, because it encompasses familiar technologies. But consider the resources Google employed to prototype, test, tweak and deploy its AJAX applications, Skorupa says. Google has the means to hire some of the very best programmers in the business, but most enterprises don't.
"You've got to assume a lot of enterprise code is not going to be that well written; it's going to be added piecemeal to current applications, and it's going to be written by people who've never done it before and who don't understand the programming model," he says.
Right now, a lot of companies are experimenting with AJAX in small doses, which is a good way to start. But until companies think strategically about how the proper use of these technologies can facilitate a clear business objective, they shouldn't expect miracles by adding an AJAX widget to a Web site. "You can't take an old Pinto, slap on a new coat of paint and expect it to outperform a Ferrari," Derechin says.
Learn more about this topic
Network World, 01/16/06