As readers of this blog may observe, I tend to write the headlines for my posts in the form of questions. And I have certainly been pondering the question of the real value of Ajax, the web application pattern that has been getting so much press this year. Given a
pretty first-class write-up in February by Jesse James Garrett, there's been quite a bit of controversy recently about whether Ajax is exciting because it represents a noteworthy approach or because it's been all the rage because the engineers at Google are
making waves with it. As part of the Ajax debate, Dare Obasanjo rightly has been wondering lately
if the software industry is becoming a fashion industry, with constant and fickle shifts of wind coming from the blogosphere that herald the current fads regardless of merit, whether it's the latest WS-* standard or an endless series of breathless articles about SOAP vs. REST vs. XML-RPC.
But back to the point. What is all the fuss about Ajax and why should we care about it from a service-oriented architecture perspective? Like REST, Ajax is more of an architectural style than a technology, though it is certainly helpful to have an Ajax engine handy to get started. In brief, Ajax is a scripting layer within a web client that uses JavaScript and XML to form an asynchronous messaging intermediary between the browser user interface and back-end web servers. This allows web developers to skip the hugely costly process of reloading pages between clicks (and other client interaction) and provide a highly interactive experience to users while asynchronously dispatching information back and forth between client and server, all without reloading the main web page the user sits on. There are loads of implications with Ajax, not the least of which server requests become about data exchange (XML), and not about transmission of presentation and visual formatting (HTML). In other words, Ajax is pretty exciting because it describes a simple method for dropping asychronous interaction with XML web services directly into a web application.

Figure 1: Web Client <-> Server interaction using Ajax
There is more of course, but the crux of it is that an Ajax application offers standards-based presentation via XHTML and CSS, dynamic display via DOM, data interchange via XML/XSLT, asynchronous server communication via XmlHttpRequest (now built into both IE, Mozilla, and Safari), with JavaScript gluing the whole package together. Typically, the Ajax engine runs as a JavaScript frame hidden offpage and allows the web page to function as an application making server-side requests in the background. Google, Flickr, and A9 have all been reported to use forms of Ajax to considerable effect.
It all sounds nice if you're trying to build interactive web apps. But does it amount to much in terms of enterprise architecture? Well, I'm beginning to suspect that Ajax is the harbringer of a new application model and will end up reshaping our view of both the client and server. Since Ajax strongly emphasizes the consumption of XML from server-side resources, it's extremely SOA friendly and allows architects to design thin but highly responsive applications that sit on top of service-oriented network resources.
While it doesn't address orchestration in any serious way, Ajax is actually a highly effective response to increasing proliferation of XML-based services while disdaining the giant, monolithic clients that application frameworks like .NET would like to foist on us. And Ajax does this by leveraging the great browser scripting techniques and related APIs that are already resident in virtually every web browser regardless of platform. The biggest shift is that except for loading the main web page, server interaction is really done in XML and not HTML. HTML is a dinosaur and growing more ancient with every passing year and Ajax will likely drive the stake all the way through its heart with its heavy use of DOM presentation. Yes, Ajax makes a lot of sense in the end.
Ajax is essentially the REST model ( being lightweight, standards-based, and having a strong architectural paradigm) positioned as the integrating engine between the presentation layer, back-end services, and manages data translation between the two. Expect to see a lot more Ajax in the near future, it has the guerilla community behind it, the Internet glitterati talking about it, and it does appear to work, as the rapidly prolifierating instances of it show us. Ultimately, I believe that Ajax will actually provide yet another reason to move towards increasing levels of service-orientation within the enterprise. Keep an eye on this space as more Ajax information comes in.
Technorati: Enterprise Architecture, Computers and Internet, Programming