Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Why Ajax may be the future of Web services

Ajax, a programming technique for creating rich, Web-based applications that look and work like desktop software, has become increasingly popular on the Web, on sites built by Google and others. That same technology will eventually power the front ends to Web services and SOA. There are some who believe that ultimately Ajax will be the primary user interface to Web services and SOAs. That's off in the future though. In this first of a two-part column, we'll look at what Ajax is and at how it works, and some of the benefits it offers for next-generation architecture.

One of the most important new Web-based technologies has lived an underground life of sorts for years, only to suddenly become extremely popular, mainly due to applications built with it on Google and other sites. It's called Ajax and it's a programming technique for creating rich, Web-based applications that look and work like desktop software, even though they are browser-based and use few resources.

That same technology will eventually power the front ends to Web services and SOAs, say analysts, and in fact are already starting to do so. There are some who believe that ultimately, Ajax will form the primary user interfaces in most SOAs and human-facing Web services. That's off in the future though.

This week starts a two-part column examining the implications Ajax for Web services and SOAs. In this first part, we'll look at what Ajax is and at how it works, and some of the benefits it offers for Web services and SOAs. In the next column, we'll look at how likely it is to being adopted widely and at some of the problems it faces on the road to adoption.

How Ajax Works

The first thing to realize about Ajax is that it's not a single technology, and that the use of it is not governed by standards or a standards body and never will be. Although it's become a hot topic, it's not even especially new.

Ajax stands for asynchronous JavaScript and XML, and it uses several technologies, including CSS, JavaScript, XHTML, XML, XMLHttpRequest, the Document Object Model and XSLT, to build rich Web-based applications that work and look very much like desktop software. The applications include the interactivity and quick response time we've come to expect from desktop applications, rather than the sluggish responses and static workings that are more typical of Web applications.

How does Ajax work its magic? In a typical non-Ajax Web application, an action in the browser requires that an HTTP request be sent to a Web server. The server does its processing, such as retrieving data or some other task and then sends an HTML page with the results back to the client (the Web browser). While the request is sent in both directions and the server does its processing or fetching, the user waits.

With Ajax, however, all that changes. When the user goes to a Web page, an Ajax engine, written in JavaScript, loads. From that point on, the user interacts with the engine, which acts as an intermediary between the user and the Web server. The Ajax engine operates asynchronously, independent of any server communications, so that a user can interact with the application, even while requests and responses are being sent back and forth between the engine and the server.

Just as important is that the engine itself can simultaneously handle actions that don't require requests to the server, such as editing data in memory, validating data and so on. This can happen instantly because server communications aren't involved — it works like a desktop application.

The result: A rich, desktop-like application, but working in a browser on the Web.

There are plenty of Ajax Web applications out there. Google has been especially aggressive in leveraging Ajax in applications such as Gmail and Google Local (formerly Google Maps). The A9 search engine also uses it. You'll be seeing it more and more.

What This Means For SOAs and Web Services

So what does all this mean for SOA and Web services? Considering that Ajax use has primarily been for consumer-level services, will it really find a home in the enterprise?

The answer, say analysts, is yes, even though it might be a bit slow in coming. Ron Schmelzer, senior analyst with ZapThink, says that eventually Ajax applications will take the place of enterprise portals that now bind together Web services and SOAs.

"People will replace Web-based portals with rich clients built in Ajax," he says, "because they offer richer functionality. You'll find it both within the enterprise as well as when enterprises interact with customers."

Banking Web sites, he notes, have started to use Ajax applications to make it easier for their customers to perform financial services. "They want to make the user experience feel as much like desktop software as possible," he says.

Schmelzer also sees Ajax use growing because of a trend he's noticed. He says that in SOAs, he is seeing "an emerging class of applications that is a hybrid — it's not a Web browser and not a desktop application. They combine the two and they consume distributed applications with all the benefits of user interactivity, but they're distributed over the Web, so they're easy to deploy."

Those applications, he believes, will be built with Ajax.

Kevin Hakman has been involved with Ajax for quite some time. He was a founder of General Interface, a Rich Internet Application development tool vendor bought by Tibco Software Inc. a year ago. Hakman is now director of product marketing for Tibco and he believes that the future of Web services and SOAs is intimately bound with Ajax.

"Ajax is important because it allows for people to use their browsers to directly interact with SOAs and Web services, it's the best way for people to get at Web services and SOA assets," he believes. Currently, Web services and SOAs perform well on a machine-to-machine level, he says, but there have been problems building usable interfaces for when people need to interact with services. Ajax, he believes, will be the answer to that problem.

Of course, today Ajax is not yet in widespread use for Web services and SOAs.

"Ajax is still very much a developer story, and has to be elevated to the business level," Schmelzer says.

What will it take to elevate it to that level and is it even possible? That's what we'll look at in the next column.

About the Author

Preston Gralla is an expert on Web services and the author of more than 30 books, including How the Internet Works. He can be reached at preston@gralla.com.

Dig Deeper on Topics Archive

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.