Ajax 101: From Toolkits To Strategy, How Companies Can Put It To Use

The Web programming approach--JavaScript logic acting on Dynamic HTML within a browser window--supports interactive elements and breaks the cycle of laborious page downloads. Instead of a single interaction per page, where the user clicks on a link to bring up information or another Web page, Ajax allows a page to conduct many exchanges of data between user and Internet server.

(click image for larger view)

It changes the performance of Web apps from a series of minidownloads and momentary delays to instantaneous data delivery. At Netflix, when a user mouses over the title of a film, the site immediately responds with the movie's actors and story line. That's Ajax at work. At American Airlines, a manager builds the next day's schedule by scrolling across a grid that spans 100,000 flights, an impossibly large display for a single HTML page. That capability is made possible by OpenRico, an Ajax toolkit created by Sabre Holdings. And when Google users painlessly share data that populates their Google Calendars, Ajax makes it happen.

The Ajax approach requires the activation of components in the browser window, usually after a download from an Internet server. They frequently remain in the browser's cache for activation without repeated downloads, speeding Ajax applications after the initial download. Depending on their number and richness, what components can accomplish in the browser window may be a little or a lot. Ajax essentially gives some control over the "weight" of a Web client--from light to a little heavier--back to application developers. In the world of HTML pages, the client is the browser window, as thin and passive as a mainframe terminal.

Businesses are starting to show more interest in Ajax's ability to generate fast, useful, and sticky Web sites. But Ajax adoption is happening gradually--there's no stampede to use it. There are reasons business technology managers are taking their time.

id
unit-1659132512259
type
Sponsored post

Trouble With Tools

The Ajax scene has been chaotic, filled with low-level toolkits, donated open source tools, and higher-level--often proprietary--Ajax frameworks. Only seven months ago, few Ajax toolkits were available, but now there are more than 70, says Rod Smith, IBM's VP of emerging technologies and an Ajax backer. A market shakeout over the next two years eventually will reduce that number to a handful of survivors, Smith predicts. In the meantime, IBM is supporting OpenAjax, an initiative that defines common actions for toolkits to implement, and the company has moved a few toolkits into the Eclipse open source programmer's workbench.

Businesses that don't want to wait for a shakeout face a choice: Do they pick an Ajax toolkit that solves their specific problems, but which might be too specialized for longevity? Or try to guess which has the legs to still be around in a few years? For that matter, should they choose a toolkit at all? It's possible to develop directly with Ajax's underlying technologies, JavaScript and Dynamic HTML, seasoned with the Cascading Style Sheets standard that applies a predetermined style to a page. That way, enterprise developers learn basic skills while avoiding the inevitable toolkit obsolescence.

Another option is to pick one of the more sophisticated Ajax development frameworks that hide underlying complexities, such as those from Backbase, BEA Systems, Bindows, Exadel, and Tibco.

Only a few companies will develop an army of internal Ajax developers, the way Amazon, Google, and Yahoo have. Most IT departments have application development skills like Microsoft .Net, C#, standard C++, or Java. But programmers with these skills usually don't know JavaScript, which isn't object-oriented. That means most of the approaches they've worked with over the last 10 years don't apply.

What's worse, they don't want to learn JavaScript. The joke among programmers is: "The only connection between Java and JavaScript is in the first four letters." JavaScript follows idiosyncratic rules and doesn't perform the same way in different brow- ser windows. To get a mapping application to work across the Internet requires mastering a huge amount of detail by programmers with lots of JavaScript experience.

That's why toolkits make sense as alternatives to the build-it-yourself route. Toolkits available today have a growing number of prebuilt Ajax user-interface widgets and components. Startups, including Backbase, Bindows, Exadel, JackBe, and Laszlo Systems, tend to produce the most creative Ajax tools, but businesses are wary of investing in development products that might not last. One way to improve the chances that the toolkit you select won't grow obsolete is to look for support from established vendors such as Software AG or BEA Systems.

(click image for larger view)

\

\

\

Who was that guy in "A Streetcar Named Desire"?

Another indicator is open source donations. Sabre, Google, BEA, Laszlo, and Yahoo have made Ajax donations. The ones that gather a community of supporters have the most staying power. If you were to inspect the three toolkits that have made it into Eclipse--all supported by open source communities--you'd find they were created for different purposes.

One of them is Sabre's OpenRico, authored by Bill Scott, now Yahoo's Ajax evangelist, and Darren James, now Yahoo's DHTML mail developer. The toolkit was designed to incorporate the ability to scroll tables into a Web application, a function called LiveGrid, hence its use by the airline flight scheduler, Scott says. OpenRico contains 50 to 60 user interface components, but its strength is focused on manipulating, filtering, and displaying data.

The Dojo toolkit, available as open source, was developed by Alex Russell, project lead and chairman of the Dojo Foundation and senior software engineer for JotSpot, a supplier of wiki tools, and Dylan Schiemann, co-founder of the Dojo Toolkit and founding engineer of Web site consultants SitePen, along with contributors from Informatica. Dojo has a very detailed set of user interface components that are capable of tracking the state of user actions on the client and allowing use of the Back button, a bugaboo of Web application designers. In conventional Web applications, a mistake discovered on the last page of a five-page form often requires the user to go back to page one and start filling it in all over again. Dojo designs a better form application.

Kabuki Dance

The Apache Software Foundation's Kabuki is based on the Zimbra Ajax Toolkit from Web app startup Zimbra. Kabuki is designed to be used by Java-oriented programmers to deliver interactive e-mail, messaging, and calendaring as Web applications, integrated with Microsoft's Outlook, Zimbra CTO Scott Dietzen says. Kabuki delivers Ajax Linking and Embedding, a Web application replacement for Microsoft's Windows Object Linking and Embedding. It was OLE that enabled one Office application to interact with another, such as importing Excel spreadsheet data into a Word document. An Ajax toolkit should enable the same thing in the hands of Java programmers, Dietzen says. Zimbra is using Kabuki to build the Zimbra Collaboration Suite, which includes Zimbra Write and Zimbra Calc.

Yahoo's User Library, released in February, is an open source-supported toolkit that hasn't made it into Eclipse but is generating a following of its own. It was created primarily by Thomas Shaw and a team of eight Yahoo JavaScript programmers. The User Library includes some of the data-handling and scrolling characteristics of OpenRico, along with calendar features, such as date selection by highlighting a day of the month, lightweight pop-up windows, dialogue boxes, and other high-performance features.

There also are integrated development environments available for Ajax developers. John Thompson, project manager for an Ajax application built by the Home Shopping Network, says his team selected Exadel's Visual Component Platform to build an application used to check shipping bills by HSN's logistics managers. As managers search through reams of data, they need to isolate suspect charges, then link those charges to the shipper's rate table to validate or invalidate them. HSN ships an average of 950,000 packages a week.

Don't Look Under The Covers

Before adopting the Exadel tool, Thompson says his programming staff experimented with working directly with JavaScript and DHTML. "It can get a little ugly once you lift the covers," he warns. Exadel provides a visual environment in which to implement Ajax and resolves the performance differences in various browsers.

Amicus uses Zimbra's Ajax-based enterprise messaging application to market an e-mail archiving system to financial services firms. The system can flag suspect terms or offers in e-mail and call them to a mail administrator's attention. The system indexes e-mail content so it can be retrieved based on subject matter for regulatory purposes. CEO Marshall Huwe says he can do a full search of his own 2.5-Gbyte e-mail archive in seconds, thanks to the application's Ajax links on his PC and in the archive. Interactive features include highlighting a name in a message to find that person's phone number or e-mail address.

\

Huwe can search his e-mail archive in seconds, but reading the results still takes hours

\

\

Photo by Mathew Mahon

Amicus Envoy e-mail hosting and management system uses a client based on Ajax that's "a good replacement for Microsoft Exchange/Microsoft Outlook" thanks to the features allowed by the Ajax client from Zimbra, Huwe says. "We're dependent on Web services and Web tools to make our clients happy. One of the things we like about the Ajax client is its robust search capability," he says. "Every e-mail is indexed as it comes in, along with its attachments." Ajax' strengths add integration and collaboration features to Web applications. Huwe seems surprised when he says, "For whatever reason, Ajax has really caught on. A lot of innovative things are happening with it."

Integrated development environments also are available from Backbase, BEA Systems, Bindows, Software AG, and Tibco. Microsoft's implementation of Ajax features will be a part of Windows Longhorn Server, due next year. It's available now as Community Technology Preview software, Microsoft lingo for use at your own risk. In March, Microsoft provided Atlas with a Go Live license, which allows the deployment of applications built with prerelease Microsoft software. In April, Microsoft provided a Visual Studio Atlas Control Toolkit, including working samples, to make it easier to build Ajax applications.

The emergence of toolkits by no means solves all Ajax development problems, and those hoping to avoid the hassle of developing their own Ajax expertise might still be advised to watch and wait. Ajax applications are known to have memory leaks in the browser window, slowing operations and eventually clogging allotted memory, or cache. Only Adobe has produced a design tool that models applications with key Ajax characteristics built into the design. So far, most tools are concentrated on the programming side of development.

Each IDE has its own learning curve; most are proprietary, and investing in one risks owning an outmoded tool down the road. But IT managers with project requirements that need Ajax may decide to adopt one now and hope it lasts. For those who can afford to wait, initiatives like OpenAjax will set clearer standards and ensure greater interoperability among Ajax tools. Yet some companies will see giving users a near-real-time response on Web sites through the use of Ajax-based applications as a competitive factor for customer-facing Web apps. Putting off the decision or waiting for open source toolkits puts you behind the early adopters.

Bret Taylor, product manager for Google's developer programs, recommends developing business logic in Java and using a tool that can resolve browser differences to save time. "We developed a lot of expertise with Gmail and Google Maps," he says. Tools in one form or another are necessary to "get rid of a lot of Ajax headaches."

So businesses face a choice. Those that don't need to implement Ajax quickly can afford to wait until the dust settles, and they can see which tools and toolkits have staying power. But companies that want to supercharge their apps with quick-response interactivity need to place a bet on Ajax tools that let them get the job done now.

Continue to the sidebar:
Ajax Poses New Security Threat