Point/Counterpoint - AJAX
Is AJAX the ideal way to build a cross-platform application, or is it just a rehash of the Java applets and CGI programs of yesteryear? Bill's opinion is Web 2.0-compliant, while Kyle's not very impressed and prefers native applications. Is AJAX the platform of the future or just a dancing bear? Read on for their take.
Kyle: So, Bill, what is so awesome about AJAX?
Bill: I dig using AJAX applications primarily because my computer becomes stateless. I don't have to worry about where that data is or installing some application—it's just there and ready for me to use.
Kyle: It seems like all those applications have already existed on the Web—they just were written in Java or some sort of CGI. I mean, I was chatting from a Web browser back in 1997.
Bill: Sure, there was a CGI chat, and I've seen Java applet chats too. But Web 2.0 is more than just chat applications, and besides, all those early apps had horrid usability issues.
Bill: Where have you been, man? Sure, that was the case when the first AJAX apps came out that were really mind-blowing, like Google Maps. Even you have to admit that dragging the map around is a huge leap in usability.
Bill: Now the applications have moved past the “gee whiz” factor and become full-fledged applications. Have you tried Google Calendar or Google Docs? Both of those are great examples. The Web interface that Zimbra uses for mail also is very good. It looks and feels a lot like most mail clients—to the point where people I've put on it have zero learning curve using it.
Kyle: That's exactly my point. What's impressive about those Web apps is that they almost act like a desktop application, yet if someone wrote the same thing as a desktop application, most people wouldn't be impressed. Okay, so I will confess. I do use Google Reader for RSS feeds, but honestly, the only thing it has over the Sage Firefox plugin is vi keybindings. I mean, Firefox already consumes enough memory as it is. The Web browser has become the new emacs: a single program that tries to do everything. It's the opposite of the “do one thing well” UNIX philosophy.
Bill: You use Google Reader! Blasphemy! That “do one thing well” UNIX philosophy is so dated, man. More and more and more programs are moving toward having multiple features and functions. It's what people want that drives that, not any overriding philosophy. People were talking about the browser being the OS back in 2005. AJAX applications help make that a reality. It's all about ubiquity—and the browser is the most ubiquitous part of any modern computer.
Kyle: That just sounds like the feature creep that we all used to complain about with Microsoft. Of course, Sun was talking about the network being the computer ages ago too, but then it needed to sell high-end servers. Is it really just the fact that Java widgets are pretty ugly that has caused everyone to rush to AJAX?
Bill: It's not feature creep...the application isn't part of the browser. If it were, then I'd agree with you. Java widgets are also somewhat fat, and there is the runtime compile issue, and the fact that despite Java's promise of “write once, run anywhere”, that wasn't close to true until recently, and even now, it's not totally 100%.
Kyle: Well, at least Firefox has gotten good about restoring your sessions. If all of your apps are in the browser basket, you'd hope you wouldn't lose your work when that basket breaks.
Bill: If you're running programs within an X session and X barfs, you lose your work too. Regardless of what technology drives an application, it still runs within a container. If the container explodes, so does your app.
Kyle: I suppose I just disagree that the Web browser is the ideal container for all of my programs. Look at how much hacking it took so that these AJAX programs can maintain some sort of state when there is no Internet connection. With a desktop program, that's not even a concern.
Bill: That's true. Gears comes to mind to enable that, and that is kind of a hack. But honestly, how often are you without an Internet connection? I seem to remember you being very proud of configuring servers remotely from a Lake Tahoe mountaintop. If you have connectivity there, most likely you'll have it just about anywhere.
Kyle: Although these days it's much easier to have a connection anywhere you go, cell-phone tethering can be iffy at places, and I can't always drop a few bucks on a wireless connection at a coffee shop just to use a word processor (not that I'd use anything but vim anyway). Plus, what happens if you are in the middle of a program and your connection gets interrupted?
Bill: The Google stuff saves your work very frequently. I'd imagine you'd lose a sentence, maybe two, at most. It all depends on the application, doesn't it? If you lose the connection to your Google Calendar, it's not a big deal.
Kyle: My last word on the subject is just that I don't see much in AJAX that wasn't done under another Web technology years ago. It just seems like hype to me—everyone who is caught up in it thinks a program is instantly better when it runs from the Web and all the vowels are removed from its name. I think some things run better, and faster, on your own computer. After all, it seems a shame for all of the horsepower in Bill's planet-sized “laptop” to go to waste.
Bill: Yeah, AJAX is a newish Web technology (Google Maps came out with it in 2005—I hate to see what Kyle thinks is old). Despite that though, it's the first technology that actually enables developers to write compelling Web applications. Java applets were way off, and Java never quite got there. I'm rather shocked Kyle doesn't like it more, as his poor midget laptop probably could run the apps just fine. After all, if the iPhone can run an AJAX application, a “real computer” probably should be able to handle it too.
Kyle Rankin is a Senior Systems Administrator in the San Francisco Bay Area and the author of a number of books, including Knoppix Hacks and Ubuntu Hacks for O'Reilly Media. He is currently the president of the North Bay Linux Users' Group.
Bill Childers is an IT Manager in Silicon Valley, where he lives with his wife and two children. He enjoys Linux far too much, and he probably should get more sun from time to time. In his spare time, he does work with the Gilroy Garlic Festival, but he does not smell like garlic.
Kyle Rankin is a director of engineering operations in the San Francisco Bay Area, the author of a number of books including DevOps Troubleshooting and The Official Ubuntu Server Book, and is a columnist for Linux Journal.
Web Development News
- The Ubuntu Conspiracy
- A First Look at IBM's New Linux Servers
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Vigilante Malware
- Libreboot on an X60, Part I: the Setup
- System Status as SMS Text Messages
- Bluetooth Hacks
- Vagrant Simplified
- Linux and the Internet of Things
- Dealing with Boundary Issues