Article

Ajax programming: The what, how and when

Brian Eastwood

Ajax programming has advanced tremendously in the time since Jesse James Garrett coined the now-ubiquitous term Ajax as shorthand for Asynchronous JavaScript and XML. The rest of 2005 brought a flurry of hype, as well as dozens of development tools. In 2006, according to a recent Burton Group report, both the market for Ajax tools and the number of vendors in the space will first grow, and then shrink, as developers understand how best to make Ajax work.

The report, released Jan. 4, indicates that other rich Internet application (RIA) technologies, such as Adobe Flash, Windows Presentation Foundation Everywhere (WPFe) and others, "tend to offer a richer tool set and stronger development platforms." Ajax, conversely, lags behind those products in terms of IDE tooling.

[Ajax] just broadens the accessibility to the Windows Presentation Foundation experience.
Richard Monson-Haefel
senior analystBurton Group

"But what we're seeing is that the situation is changing really fast," noted Richard Monson-Haefel, senior analyst, Burton Group, and the report's author. The Eclipse Foundation, led by IBM, recently threw its support behind the Open Ajax initiative, and industry leaders Microsoft and Sun plan to integrate Ajax into their tools. By the end of the year, Monson-Haefel said, Ajax should catch up to those other IDE tools.

A three-tier framework

Unlike HTTP page requests, which rely on a back-end server to update a Web page, Ajax renders page updates on a client's CPU. This allows for asynchronous updates -- changes to one part of a page but not another -- and can result in faster, more responsive applications.

Making Ajax work requires three levels of tools, Monson-Haefel indicates. The first, remoting toolkits, communicate between the Ajax application in the Web browser and the app sitting on the back-end server. The second, UI toolkits, provide pre-defined GUI widgets. The third toolkit, Web framework extensions, integrates Ajax into existing Web frameworks.

Most Web framework extensions also include remoting and UI toolkits.

Ajax Web framework extensions compatible with ASP.NET

 A list of ASP.NET-compatible extensions appears in the box on the right.

Monson-Haefel's report lists four dozen different Ajax frameworks and toolkits. Given the technology's open-source origins, this is not surprising.

Monson-Haefel expects the number of Ajax programming products to grow before it starts to shrink, contracting to the point that only a few tools dominate the space -- much like the SOAP toolkit market did. "At first there were dozens of products for SOAP messaging, but now they're using facilities built into vendors' tools and IDEs, and that will probably happen here," he said.

The current proliferation of tools carries both advantages and pitfalls.

"What the libraries are doing is solving all of the quirks for you and giving you the right information with the minimum amount of work," said Eric Pascarello, co-author of the book Ajax in Action and an expert on both .NET and JavaScript. "Now a simple call to [a library] will give you the correct height of a div with IE, Firefox and Opera. Using a library will greatly improve the development time."

On the other hand, Pascarello noted, a lot of libraries lack sufficient documentation, and "you can see the frustration in some developers on the forums trying to figure out how things work." In addition, the turnaround time for fixing bugs in some libraries is an unknown, as they were created during a developer's free time.

When, and when not, to use Ajax

The advantage of Ajax programming over tools like Flash and Java applets, Monson-Haefel said, is its seamless integration with HTML content. This allows for incremental implementation of Ajax, as opposed to an all-out redesign. "There's no need to pick up a new presentation element," Monson-Haefel said of Ajax. "It's a seasoning element."

More Ajax programming resources

Ajax Learning Guide

Dynamic Double Combo -- Chapter 9 of Ajax in Action

Eric Pascarello dissects Ajax security vulnerabilities

With Atlas, Microsoft's Ajax programming tool, .NET developers can extend the rich functionality available in the Windows Presentation Foundation over the Web browser -- but end users do not need the .NET framework installed. "[Ajax] just broadens the accessibility to the Windows Presentation Foundation experience," Monson-Haefel said.

Controls such as combination selection lists, stock and news tickers, polls, shopping carts, autocomplete fields and rich ToolTipsText are good candidates for being "Ajaxified," Pascarello said. "Start with a double combo or an autocomplete component and work your way up from the top," he added.

However, Ajax does offer the capacity to disappoint or frustrate, as bloggers Kevin Burton and Chris McEvoy point out in separate critiques of Windows Live Beta. Commentaries on inappropriate uses of the technology, such Alex Bosworth's "Ajax mistakes" and Joel Spolsky's "Too Many Ajax Calendars, are not hard to find either. (Microsoft aims to address one obvious downside -- bulky JavaScript code -- by including JavaScript libraries in its Atlas tool, which is due for general release later this year.)

For Monson-Haefel, the pros and cons of Ajax programming are reminiscent of two earlier Internet app developments: Flash screens and pop-ups. Both meant well, but lengthy Web site intros and the plague of pop-up advertisements quickly bothered end users. "If Ajax is used poorly, people could find it annoying to the point that they turn it off. In this case, they'll turn off the JavaScript," Monson-Haefel said. "If you have little dancing paperclips, it's probably going to detract from the user experience."

Given the immaturity of Ajax technology, the Burton Groups recommends "very small and incremental implementations of Ajax," Monson-Haefel concludes in his report. Ajax works well for lightweight RIA that will complement existing HTML, he suggests, while Flash is better for building a rich GUI.


There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: