AJAX is real and available. Unlike some other technologies, it's not just another over-hyped product or feature that is waiting for the "next release" of a software package, product, or operating system; it is already pervasive. Because of this availability, AJAX is becoming a worldwide standard and practice at a rate that no one expected, not even Jesse James Garrett who coined the term AJAX in his online article in February 2005.
Originally, the core technology behind AJAX appeared back in 1998 when Microsoft created it to allow online applications, such as MS Outlook, to run through the Web browser. Today, all Web browsers support this technology, and ironically, many browsers support AJAX better than Microsoft's own Internet Explorer 6.
So why did I title this article "AJAX: The Java Killer?" For what seems like forever, Java has been referred to by its advocates as the technology. But Java has yet to achieve one of its primary goals in order for it to be that killer technology; it hasn't become pervasive. Java is no more pervasive than other third-party software applications such as ActiveX or Flash. Java apps often need to be downloaded onto a PC or server to be used, the user often needs to confirm installation, the Java VM needs to start up, and then the code begins to run. By the time this happens (the first time through), you've already gone to lunch and closed your browser.
With AJAX, you start your browser and there's no waiting around for an environment to load, for an application to download, or for the user to confirm that something should be installed; it just starts running.
Certainly, one of the biggest arguments against using AJAX (mostly from Java advocates) is that callbacks to the server provide a lag time throughout the application, but those calls are asynchronous (that's the first "A" in AJAX), so those calls run in the background and the user has no perception of any lag time. In addition, no one is still using dial-up, so even with large amounts of text being sent via a single call (which is rare but possible), performance is great and will only get better.
Actually, what makes AJAX so popular today (beyond Garrett giving it a catchy name) are these facts:
- The browser wars are over.
- PC and Mac CPUs are "fast enough."
- RAM/memory in PCs and most Macs is more than good enough.
But Java continues to have two glaring problems that seem to hinder its widespread acceptance:
- The VM startup time is still not acceptable.
- The specification has not yet stabilized.
Not to mention the fact that Sun (the owner of the Java language) is having problems.
Don't get me wrong: Java is a great language, and although I learned the language and programmed with it several years ago, I never felt good when it came time to say, "All you have to do is install the new VM that's coming out next week to get the features in this app to work."
Java is a powerful language, but so are PL/I, COBOL, RPG IV, C++, and Python. The difference is that Java is supported on more platforms than these other languages, but it is not as pervasive as AJAX technology.
Whereas Java requires you to basically abandon the investment in your skill in COBOL, RPG IV, or C++, with AJAX you leverage your current skills and application portfolio to create a compelling user interface experience. Those skills can be Java-centric, but they can also be PHP, RPG IV, C++, C, COBOL, Java, or even (help us) CL on V5R4. I know it sounds crazy, but in OS/400 V5R4, you can even call a CL program using AJAX technology, which is a little too scary for me to think about.
Java is now becoming just another programming language like RPG IV, C, or C++, but it has the added disadvantage of the startup time that these other languages don't have. If you think this lag time isn't important, then great. Go for it! Today, the MTV generation has moved into the workforce, and a "downloading applet" message isn't going to cut it with them; they've already closed your browser window and moved on to ESPN Web site.Bob Cozzi is a programmer/consultant, writer/author, and software developer of the RPG xTools, a popular add-on subprocedure library for RPG IV. His book The Modern RPG Language has been the most widely used RPG programming book for nearly two decades. He, along with others, speaks at and runs the highly-popular RPG World conference for RPG programmers.