RealTime IT News

The Return of AJAX?

Some relatively new Google applications have prompted renewed interest in a programming technique that is years old.

Google Suggest and Google Maps gave Web users the sense they were using a desktop application instead of an Internet-based tool.

Google Suggest fills in words for suggested search terms, and typing an address into Google Maps returns a detailed map of the immediate area with the ability to pan out to state or national boundaries.

The apps were created using Asynchronous JavaScript and XML (AJAX), which calls from the server only the information you need for the Web browser. Rather than querying the Web server directly every time a request is made from the browser, AJAX sticks a JavaScript element between the two. This allows the browser to maintain its state while the script runs the data request to the Web server and back.

Bret Taylor, product manager of Google Maps, said the buzz created around the company's applications happened because of how they differ from most of today's Web pages.

"It's definitely a new awareness of older technologies, but I also think it's fairly typical that technologies mature to the point where they become widely accepted."

The Promise of AJAX

Given the excitement AJAX has caused so far, you'd think it was the latest whiz-bang technology to emerge from a research laboratory. That's not the case.

Before Google and Amazon , with its A9 search engine, used the technology, Microsoft was already onboard with Outlook Web Access.

The programming style incorporates a number of open Web standards, including XHTML , XML , CSS , XMLHttpRequest, XSLT and DOM .

The promise AJAX programming brings to Web development, with its speedy and powerful processing times, has led some to speculate whether the medium could replace the need for desktop applications altogether. If a Web application can do what a desktop application does on the PC, why bother with software installs?

That's a huge leap in logic to make, said Ron Schmelzer, a senior analyst with research firm ZapThink. He points to the claims made by Sun Microsystems in the late 1990s with its "network as a computer" concept of putting software on the server.

"Just because you can run application functionality remotely doesn't mean it's appropriate for everything, like when you're offline," he said. "Basically, anything that requires productivity over distribution, there's no reason to have a remote word processor because what's the benefit of having it over the Web versus having it on your desktop?"

What's Holding AJAX Back?

Two things have kept AJAX in the backseat of Web application development. First, Microsoft's adoption of Web standards in Internet Explorer (IE) has been tepid. And second, it's hard to pull off.

Microsoft used XMLHTTP to get information from the server to the browser, without having to refresh. But there has been little major incorporation of Web standards into IE for Web application developers to manipulate. So developers have little choice but to limit their applications, or else much of the Web-surfing public would be unable to view the page.

Developers have Firefox and other alternative browsers, with their native XML support, to thank for the recent change by Microsoft to incorporate more Web standards, Schmelzer said.

Microsoft has had robust XML since IE 6, he said, but the company was pushing ActiveX over using XML and JavaScript as the method of choice. Firefox's growing popularity, however, has shifted opinion that XML is the way to go for data, rather than the Windows-centric ActiveX.

"There's no such thing as ActiveX on the Mac platform or Linux platform, so when you're building a Web site and say, 'I'm using ActiveX,' you are going to by necessity cut out some of your audience," he said.

Another reason for the relative dearth of AJAX-powered applications is its complexity, though software developers are beginning to step forward with solutions.

AJAX requires developers to have a firm grasp on not only the Web standards being used but also the server-side knowledge to extract information from a database or other repository.

"Doing AJAX is rocket science, it's so hard," said Brian Goldfarb, product manager of Microsoft's Web platform and tools group. "You look at the stuff Google did with Google Maps and Amazon with A9; they're some of the brightest minds in the industry building lots and lots of code to enable those types of sites."

That makes it a difficult proposition for the mass of developers in the industry today, he said. Microsoft, of course, has an answer to that complexity in the form of an upcoming client-side framework code-named Atlas.

Atlas eases the code complexity with drag-and-drop boxes and other objects to take the manual labor out of code development. Goldfarb said that with Atlas, what took Google hundreds of lines of code to do with Google Suggest will take 10 or 15 lines in Atlas.

A developer's preview version of Atlas will be available in September at Microsoft's Professional Developers Conference in Los Angeles, Goldfarb said. The final version is expected about the same time as Windows Vista.

Microsoft sees a potential in AJAX-style programming and asynchronous data retrieval. The company will look at ways to tie this technology into the Microsoft product line, so that customers will be able to take an eBay auction and drag it into their Outlook calendars.

AJAX Platforms

ZapThink's Schmelzer sees Web development coalescing around two interactive development platforms: AJAX and Macromedia's Flash.

"The person who builds a Flash application is not exactly the same kind of person who would build an AJAX application, but at some point I think those are going to be the two dominant, rich Internet solutions out there," he said.

Macromedia officials, for their part, are happy to hear about the excitement building in the developer world over rich interactive Internet applications.

Jeff Whatcott, the company's vice president of product management, said that fundamentally the two technologies work well together. Flash, like AJAX, uses XML for the server-side information asynchronously and ActionScript, which is a cousin to JavaScript, to grab the information.

While the buzz generated by AJAX is a good thing, he said, developers looking to create rich interactive Web sites are going to find that the programming technique falls short.

AJAX improvements, Whatcott said, are dependent on the Web standards implemented in browsers; Flash development, on the other hand, relies on the 480KB-sized Flash plug-in found on 98 percent of the world's PCs.

He noted it took four years for IE 6, the version with the added XML support, to reach 80 percent of Windows desktops. It takes 12 months for a new Flash plug-in version to reach that same penetration rate.

"The distribution dynamics of Flash versus browsers -- this lowest common denominator problem you have when you rely on features that are shared across browsers -- is a fundamental issue that is going to leave a lot of people dissatisfied with how far they can go with the AJAX technique."

That doesn't mean that he thinks AJAX will go away any time soon; in fact he thinks it will be around forever, which is good because it raises awareness about what both camps are trying to achieve.