Software Development
Blogs and Discussion
developer.*
Books Articles Blogs Subscribe d.* Gear About Home

Dispatch War Rocket AJAX!

Ahh, the glory of a good Flash Gordon reference; it never fails to brighten one's day. But today I am not following the orders of General Kala, or doing the bidding of Ming the Merciless. Today, I am playing The Curmudgeon on the subject of Web 2.0 and the mysteries of Asynchronous JavaScript And XML--better known to the digerati these days as AJAX.

Well, maybe it's not so much a mystery. More of a buzzword, and one I was growing sorely tired of reading-but-not-knowing. Until this morning, that is, when I dove into the deep end of blogosphere (talk about buzzwords) and tracked down the definition of this AJAX stuff. Courtesy of a link on Keith Rome's blog, I was able to dig into 5-8 sites, every single one of which failed to provide a simple definition of the term, so caught up were they in the buzzword feeding frenzy.

*** By the way, I love it when a website is so dedicated to something that it totally fails to provide even the most basic topic-sentence information in favor of balls-to-the-wall, in-depth, geek-centric coverage. C'mon guys, a 4-question FAQ page or a link to wikipedia isn't that hard to muster... ***

So imagine my surprise when I discovered, after finally finding such a link (hit it above), that AJAX is the same damn thing I've been doing for years now. Apparently, it's been given a snazzy new name by some bloggers somewhere, which caught on, and now they're giving presentations at some geek conference somewhere for several thou per engagement, including expensed airfare, hotels, and meals, wiFi hookups, digital cameras, fruit-bats, breakfast cereals, etc.

And so it came to pass that I learned something nice about AJAX--that I was actually AHEAD of the curve on this particular buzzword. I was doing Remote Scripting in ASP 6 years ago, followed XmlHttpRequest techniques across both M$ and Java technologies, and looked at ASP.NET callbacks and said "well, DUH".

I guess my curmudgeony attitude about this comes from that same place--"Well, DUH". Of COURSE it should be a primary goal in ANY type of development to emphasize and maximize the user experience. You should always have that top-of-mind as a modern software developer. The mixing in of whiz-bang technology notwithstanding, you should plan your design and architecture around the user's needs as much as possible. Is that really a revolutionary idea? If so, it would seem that the inmates truly ARE running the asylum.

And concerning the whiz-bang stuff, it's important to keep in mind that sometimes it's neither appropriate or the best solution. This can be for architectural reasons, because of the target audience for a given web app, because it adds complexity to an otherwise simple solution. Plus (and I say this from experience) you can screw stuff up with respect to maintenance and testing by doing too much tricky client-side coding. It's hard to debug, race conditions can pop up faster than you can load that IFRAME, XML is not a silver bullet, DHTML/XHTML is not even really applicable on older browsers (yes, Virginia, there really are still Netscape 4.0 users), etc.

The product I currently spend my days with is a good example of the fact that these techniques have been around for a good long time. We use LOTS of javascript and XmlHttpRequests, in addition to RPCs, in order to create a web-based user experience that is very c/s-like. Of course, this is also an example of the caveats I mention. The app is buggy, hard to maintain, loaded w/ complicated JScript and standard ASP 3.0 spaghetti code, and is sometimes a dog because of almost constant walking of DOM trees. A healthy dose of XSLT would actually cure a lot of that, but as I have indicated in my previous posts that sort of change is not at the top of the list of Things-To-Do here at Business-X.

All that said, "AJAX" is cool stuff, and it's really the way to go barring the presence of the concerns I outline above. It feels nice to be beyond the bleeding edge for once! I look forward to digging into some newer flavors of these techniques, using Ruby on Rails, Python, etc.

Does AJAX Assume a JavaScript Framework?

Hi Andy,

I'm with you on your reaction to finding out that AJAX is something you've been doing all along.

That said, I wonder if there is something different in the latest buzz. I'm no AJAX expert, but my impression was that the current frenzy around AJAX is distinguished by the idea that application in question is using a sophisticated JavaScript framework such that the actual UI coding you're doing does not have to worry so much about the ugly details you mention. MochiKit is one of them, and I think there are several others also, and I think some companies have developed proprietary ones (though I don't know how you'd protect it, other than I suppose obfuscation).

In your research, did you find that there is this underlying assumption of a framework that is loaded into the browser, with the browser-based UI built on top of this framework? Or are people using the term AJAX to refer to any kind of "remote scripting" based technique to improve the browser UI experience?

Dan

AJAX Your Problems Away

This page gives a pretty decent summary of AJAX:

http://www.adaptivepath.com/publications/essays/archives/000385.php

It is funny that there is suddenly so much buzz about this "new" "technology" which is in fact neither. I had assumed that AJAX was actually an API or library or framework that made this kind of remote scripting development easier. But that does not seem to be the case. Weird.

Though I can see the power of this sort of thing, it kind of seems like strapping a French bikini on Aunt Gert. If it is really so important for your webapp to behave like a desktop app, well, then why not make a desktop app?

Obviously there are serious hurdles to desktop apps. They require installation. They can hijack your computer if you're not careful. They are hard to maintain across umpteen users. They require different code for different platforms. Of course, Java has a solutions to many of these problem, but comes with its own bag of issues.

The point is that desktop apps are tricky to develop so we've moved to webapps, which provide a less rich user experience but are easier to develop and maintain and don't require the user to install anything. But the problem is that the browser-as-operating system has serious limitations. We can try to get around these with goofy scripting solutions, but these will begin to lead us down the path that left us wanting to move to webapps in the first place. Browser incompatabilities, etc. Plus, as Andy points out, at this point such code is tricky to maintain and develop and tends toward spaghetti.

There ought to be a better way. Java started with a promise of simple compatability and they've even got nifty technologies like webstart that make distribution and updates pretty easy to set up. But Java itself never delivered a reasonable system for developing GUIs. The broswer has replace Java as the cross platform container of choice, but it was never really designed for this use.

Somebody out there please come up with a better idea.

Cooperation Hurdles

Rob writes:

The browser has replaced Java as the cross platform container of choice, but it was never really designed for this use. Somebody out there please come up with a better idea.

I wonder if it's ideas we're short on, or just cooperation and some kind of committment to the general good. While I agree that the browser's origins in a text-oriented medium has limitated its ability to grow into a platform for hosting applications, it has been the slow convergence of competing browsers towards a shared, and ever-growing, technical standard that has been the most damaging to the potential for browser-based applications. Maybe this level of coordination is utopian, too much to ask, just one of those paradoxes we have to live with in a capitalist system. Competition and innovation are required in order to incentivize people to create, but at a certain point a lack of coordination hurts everyone.

Imagine if all browsers right now supported the most recent CSS standard to the letter. Imagine if in the late 90's the competing browsers had standardized on DHTML. Imagine if instead of trying to control the web as a Windows-centric platform with ActiveX if Microsoft had instead tried to work with others on coming up with something open? I doubt shortage of ideas would have been a problem.

Dan

Charge the lightning field

According to my limited research, Rob's answer is correct: there is no single standard toolset/framework for AJAX. So the sophisticated JavaScript framework is indeed implied, but not supplied. Ha-ha, the joke's on you.
The page Rob links to is by AdaptivePath, who are credited with originating the buzzword -- although they clearly came up with neither the ideas nor the techniques.
I have to agree with Rob on the whole "make -your-browser-app-look-and-act-like-a-desktop-app" thing. It's as clumsy to do as it is to overhyphenate.
If browsers were a little more standard, things might be a bit easier. But the underlying limitation in the whole scheme, to me, is HTML. DHTML is not a different flavor of HTML -- it's the same tag set with lots of JavaScript used to fiddle with it at runtime. HTML was conceived and executed as a static markup language, and no matter how you bend and stretch it, a browser is effectively no more than a glorified file viewer.
On a related note, I think it's somewhat interesting that a big part of M$' longterm stragety w/ both Visual Studio and Windows Vista is the whole "smart client" thing; they're repackaging c/s again! I ask "what do they know that we don't?" Maybe nothing, but I can tell you from my daily contact with a very client-scripting heavy system that oftentimes it would be much easier to deal with a legitimate event-driven fat client app than to try and work in within the confines of the browser.

Prototype JavaScript Library

I stumbled today into this review on SitePoint of Prototype, an object oriented JavaScript library (by way of a blog post about a Prototype reference poster).

I've been following this JavaScript library trend with interest, but I have yet to make any real use of them. I'm not so sure that I'm eager to get into any JavaScript-heavy browser-based projects, but who knows, it could be fun.

Dan

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Recent comments

User login

About our advertising.

Atom Feed

developer.* Blogs also has an Atom feed, located at this url.

Click here for more information about Atom.

A Jolt Award Finalist
Software Creativity 2.0
Foreword by Tom DeMarco

Recent Posters

Based on most recent 60 days, sorted by # of posts and name.

Google
Web developer.*

Who's online

There are currently 1 user and 23 guests online.

Online users

Syndicate

Syndicate content
All views expressed by authors, bloggers, and commentors are their own and do not necessarily reflect the views of developer.* or its proprietors.
Click to read the Copyright Notice.

All content copyright ©2000-2005 by the individual specified authors (and where not specified, copyright by Read Media, LLC). Reprint or redistribute only with written permission from the author and/or developer.*.

www.developerdotstar.com