AJAX vs. desktop development

AJAX development techniques create more interactive web applications that will put pressure on traditional desktop development. Desktop development, however, isn't standing still, and may leverage the expectations created by AJAX-style applications to popularize new innovations in desktop development technology.

AJAX is the web development buzzword du mois. AJAX programming isn't really anything revolutionary. It is simply a means of combining a bunch of web-oriented technologies in a way that enables highly-interactive browser-based applications. There are a variety of AJAX definitions floating around, but I think this article outlines the essential elements:

  • standards-based presentation using XHTML and CSS;
  • dynamic display and interaction using the Document Object Model;
  • data interchange and manipulation using XML and XSLT;
  • asynchronous data retrieval using XMLHttpRequest;
  • and JavaScript binding everything together.

Of course, that's the way a developer would define AJAX. From a user perspective, though, AJAX applications - such as Google Maps or Microsoft's Consumers are no longer willing to put up with the traditional 'good enough' web interface.Web Exchange client - are simply web applications that more closely approximate features normally associated with traditional, standalone desktop applications.

Historically, web pages haven't been as interactive as traditional desktop applications. The web environment has limits, but the ease with which colorful "eye-pleasing" user interfaces can be developed combined with the automatically updated nature of a web application (you download the user interface each time you access it) outweigh these limitations. The user interfaces was "good enough," and the other benefits outweighed the costs.

With the growing popularity of AJAX-style interfaces, what was "good enough" has gotten souped up to compete more fully with desktop applications (though not completely...there ARE differences). Web development is already the most popular form of application development. Will AJAX programming techniques further that trend?

Maybe, assuming desktop development stood still and didn't try learn from its web competition. Fortunately, standing still isn't in the nature of competition, and desktop application development certainly isn't standing still.

First, though, consider what the shift towards more interactive, AJAX-style web sites means for web development. It signifies that consumers are no longer willing to put up with the traditional "good enough" web interface. They want something that FEELS like a desktop application, and that means the bar has been raised on web development, making it that much more complicated to develop.

With this raised bar, web development starts to become less elegant. HTML and CSS as a layout scheme is great, and a vast improvement over the limited functionality programming widgets that exist in traditional desktop development. Interactivity, however, demands programming, and unfortunately, Javascript doesn't scale up to the AJAX level cleanly.

Don't get me wrong...I use Javascript all the time. I used to annoy people at Nortel with my Javascript wizardry (back in 1997, there was a movement afoot to BAN JavaScript at Nortel, and I was, shall we say, resistant to that). I built tree views, calendar controls, animated menus, etc. using Javascript, and thought it was great that I could do all these interactive things that I had assumed were no longer possible in the HTML world.

The fact that you can write interactive web sites in Javascript, though, doesn't make Javascript a great programming language for complex site development. Javascript isn't merely a procedural language, and it does support objects, as well as the creation in script of new ones. The interface for doing this is hardly clean, though.  It's like defining objects in C, where you manually set the function pointers on your object.  Since the object is dynamically defined, however, you can easily create hard to find bugs by mistyping a variable name elsewhere in your code, a name it happily accepts because the definition of custom objects is dynamic.  Last, Javascript is not a strongly typed language...at least not in the form used in most web browsers.

Anyone who has had to cull through several thousands lines of Javascript to figure out what a site is doing knows what I mean. Stacks of functions that manage the interactivity of an application might work, but it doesn't make the programming model elegant. Just for context, I could write an entire application using Office VBA (Visual Basic for Applications, the scripting language used for macros in Microsoft's Office suite). That doesn't make it an elegant way to write large, complex applications.

Traditional programming languages, with strong typing and rigorous object orientation, are a better option for such applications. That adds some complexity, but then again, AJAX-style web apps are harder to develop, making the productivity difference between desktop development and web development smaller. If desktop development could just fix its deficiencies, desktop development could start to seem a lot more compelling an alternative, particularly now that consumers have demonstrated a preference for highly-interactive applications.

That seems to be occurring.

The first example is Flash. Flash is normally associated with animated web sites that annoy the surfing programmer stuck in a typical "Joe Friday 'Just the Facts'" mode. Flash, however, also makes an interesting application development environment, enabling visually appealing user interfaces with less effort. Flash applications can also be turned into desktop applications, enabling the productivity benefits of the Flash environment to intersect with desktop applications to create something better than old-school desktop applications.

Microsoft, likewise, is turning the standard Windows development model upside down with its Windows Presentation Framework, slated for inclusion with Windows Vista and released as a separate library for Windows XP. Using the new vector-based rendering engine of Windows Vista, the old-style block rendering model is replaced with something more flexible. Furthermore, applications can be laid out, and effects tailored in an XML file (the specific grammar of which is defined in Microsoft's XAML schema). This XML layout capability makes desktop development more like web development (the layout portions of which are a vast improvement over the traditional desktop model), and combined with the auto-update feature of desktop applications in Windows Vista, could provide interactive capabilities far in excess of web applications while offering the productivity advantages of web-style development.

XUL is another option for highly-interactive desktop applications. Built as more of a hybrid of web programming and desktop application development (it was designed to create the user interface for Mozilla), it supports all the standard web technologies (CSS, Javascript, HTML), while enabling richer user interfaces than possible with standard browser applications.

Web development is probably the dominant model for application development. The fact that the commanding heights are still held by desktop applications, however, shows that there are features in standalone applications that still trump web applications. Those features may grow in importance as AJAX habituates people to highly interactive applications, and as desktop development ditches old development paradigms and embraces the innovations of the web environment.

Newsletters

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
See All
See All