AJAX presents corporate problems, opportunities

Industry watchers caution of AJAX's complexity.

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.

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 Asynchronous JavaScript + XML can be more complex - and less network friendly - than they might first appear.

AJAX refers to a set of technologies including JavaScript, XML, Dynamic HTML and asynchronous XML/HTTP calls. Jesse James Garrett of consulting firm Adaptive Path coined the term AJAX in a February 2005 essay to describe the assortment of browser-native tools and technologies that make applications such as Google Maps and Google Suggest as slick and responsive as they are.

Google Maps sends an XML datastream to the browser to let users pan around the globe and zoom in on maps and satellite images with an ease that is expected of a desktop application, not a Web application that has to continually fetch content from a remote server. Google's Suggest application uses JavaScript to offer search suggestions and quantify search result sets as a user begins to type a query in the search box.

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."

Client/server considerations

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.

Hype vs. reality

It's true that companies can create responsive Web applications using the Web-scripting components known collectively as Asynchronous JavaScript+XML (AJAX). But not everything that's said about AJAX-style development is true.
AJAX is new.The technologies that make up AJAX — including JavaScript, Dynamic HTML and XML — have been around for some time. Consultant Jesse James Garrett coined the term AJAX in early 2005 to describe an approach to user interface design using these elements.
It's easy.Just because the tools and standards are familiar doesn't mean the technology is easy to get right. Crafting a smooth, secure and efficient AJAX application requires a skilled programmer with an understanding of network and server-side technologies.
AJAX is for business-to-consumer sites.Google's initiatives spawned much of today's AJAX buzzfest, but the design approach is an equally good fit for portals, intranets and B2B Web sites if properly executed.
It's good for your network.In theory, AJAX technologies reduce the number of network round trips required to grab Web content for users. But in reality, a poorly designed AJAX application could multiply the number of open network connections and inundate servers with content requests.

Learn more about this topic

AJAX accelerates Web applications

Network World, 01/16/06


AJAX initiative adds backers

InfoWorld, 05/09/06


Jesse James Garrett essay, "Ajax: A New Approach to Web Applications"


IBM document, "Considering Ajax: Cut through the hype"

Editors' Picks
Join the discussion
Be the first to comment on this article. Our Commenting Policies