AJAX is the future of app development

If you've used Google Maps, Gmail or Microsoft's Outlook Web Access, you're familiar with the power of AJAX, which gives Web applications the responsiveness users associate with desktop applications.

Fundamentally, AJAX (Asynchronous JavaScript + XML) enables back-channel communication in Web applications so that only small portions of Web pages need to be updated in response to user activity. Compared with traditional Web applications that follow the familiar pattern of waiting for a whole page to load, deciding what to do, clicking and waiting again, AJAX applications offer a better user experience. Plus, if done right, an AJAX-style application can reduce both bandwidth and server requirements.

It's no wonder that AJAX has generated lots of hype. However, before you "AJAXify" your Web applications, you need to be aware of the pitfalls, particularly in the areas of security, reliability and performance.

What's AJAX all about?

AJAX requires significant mastery of JavaScript, which, unfortunately, is one of the most maligned, misunderstood programming languages in widespread use. Many developers see it as a toy scripting language with a C-like syntax, relegated for use in building simple Web page embellishments or setting up Web form validation.

However, we'd argue that JavaScript is actually a powerful prototype-based, object-oriented scripting language, closer to functional programming languages widely used in academia -- such as SELF and Scheme -- than to its cousin-in-name Java.

Admittedly, JavaScript's negative reputation is not completely unfounded. Incompatibilities in the JavaScript object models supported by various browsers can make coding quite a chore. The language also lacks widespread tool support, making extensive system development and debugging onerous. The fact that companies such as Microsoft and Google have built mission-critical Web applications that rely heavily on client-side JavaScript is no small feat.

Pitfalls of developing an AJAX app

While it may seem relatively easy for intermediate JavaScript programmers to code an AJAX-style communication, quite a few potential problems can arise in the process, ranging from cross-browser issues to error conditions.

Furthermore, programmers will probably need a new set of rich interface widgets to implement a desktop-like interface. This leads to some confusion as rich widgets thought of as DHTML (basically, just JavaScript with Cascading Style Sheets) are now reborn as AJAXifed widgets.

Web developers ultimately need a complete, robust AJAX-focused development stack that will marry client-side and server-side programming in a neat package.

It's likely that Microsoft with its Atlas project and Sun with its various Java 2 Platform Enterprise Edition AJAX examples and components will ultimately win over a large portion of the developer community, particularly when each vendor fully integrates these efforts into its development platforms.

But for now, many early adopters continue to roll their own AJAX libraries, use open source frameworks such as Prototype and the Dojo Toolkit, explore the few more developed commercial platforms from vendors Tibco, JackBe or Backbase, or completely switch gears and adopt a new language such as Ruby with its programmer productivity-focused, Ruby on Rails Web development framework.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

More about GoogleMicrosoftPLUSSpeedTibcoVIAWorld Wide Web Consortium

Show Comments