Aine: AJAX is not everything…

While I am a supporter of the technologies for which the abbreviation AJAX stands, I’m also convinced that AJAX is not the solution to everything. Right now every tutorial, library or comment that is even remotely AJAX-Related is getting a huge amount of attention, just because we’re in the middle of an AJAX-Hype. Yes, it is in fact a hype, because people hear of it and run to the next book store and buy a book without having the remotest idea on what AJAX is good for (the book buying people are the ones I prefer over those Newsgroup posters that post hundreds of posts like “I’m new to AJAX”, “What is AJAX good for”, …).
AJAX is a technology like thousands of others, no more no less, with all its strengths and weaknesses.

I came across a post in the JavaLobby Forum:
After attending an interesting AJAX seminar in NYC I did not change my mind. Initially, I was prepared to ask specific technical questions about AJAX problems, but even without my tricky questions every presenter was talking about lots and lots of issues they were facing while developing AJAX applications. This was the most honest team of presenters I’ve seen so far (btw, the team has included Jesse James Garrett, who named a set of existing technologies AJAX).

After hearing all their testimonies about the plethora of AJAX issues, during the evening I decided to ask a generic question, if the panelists believed that AJAX would be around in three years. Most of them answered that it’ll be around in three, but they were not sure about 5 or 7 years from now. Fair enough. I had an impression that all of them enjoyed the technology, understood the issues, and were willing to try to solve them… somehow.

So far I coded both AJAX applications and Java applications, and both have advantages, but let’s focus on AJAX:

Strengths

  • Easy to deliver: (nearly) every browser nowadays supports JavaScript, thus an application written in JavaScript, on top of other standards, like DOM, will probably run on most Browsers.
  • Complex is easy: AJAX is pushing the development of applications in a direction where complex workflows are wrapped in a really easy to use presentation, hiding complexity and making important things visible.
  • Software as service: for long time software was a piece of code that you bought, now it’s a service that you subscribe to. Where’s the difference? Its easy, with AJAX the code is no longer kept secret (can I hear some OpenSource Developers cheering? =D) and businesses are shifting from selling the code to offering a service. 37signals is probably the best known and most successfull company that uses this model.
  • Everybody can use it: the steps are easy open your browser (remember not to click on the blue ‘e’) and point it to a URL, that’s it. From there you are driven through the rest of the application, with nice popups, overlays explaining what you have to do, and telling you where to fill in what. It feels smooth.

Weaknesses

  • Hard to code: because JavaScript support in the browsers is not standard compliant, and every browser adds its own “enhancements” the developers have to work around to those heterogenic environments and add abstraction layers in between, slowing down the application.
  • The URL-Paradigm is lost: URL stands for Uniform Resource Locator and it basically used to locate resources, such as Documents, Audio files, Images, and alike. With AJAX this is lost because what good is it to locate the resource if what it looks like solely depends on the means to access it? AJAX applications look different and react different in each browser. Many developers now complain that AJAX takes away the bookmarkability, in my opinion this is good! A URL may solely be used to locate the application, and not the states in which the Application currently is. It’s not good to bookmark states of of an application.
  • It’s slow: yep, JavaScript, being a purely interpreted language, is really slow, no way to argue about this.
  • It’s easy to make errors: JavaScript applications may grow really complex and we don’t have necessary tools to debug and test the applications, furthermore in one environment (browser) an error might occur at a certain point while in another it runs smoothly. The testing and debugging efforts grows exponentially with the amount of code and the complexity of the application, while this is true for all languages and applications, in AJAX this is particularly dangerous, because we can’t automate these things, and tools are scarse. This might still improve over time, we’ll see.
  • Code is readable: I’m not a big supporter of the security by obfuscation method, which is secure as long as an attacker cannot access the code of the application, but being able to read the applications gives an attacker better tools to attack the application. This is also the main reason you won’t see big applications from non-OpenSource teams: no one wants the others to see your code if your going to sell it…

AJAX is surely a step into the right directions, but one must ask himself if AJAX is the way to go further on. While AJAX does very well for small applications it is not usable for larger applications. Applications such as Writely are on the very limit of the AJAX Universe, to go beyond this we have to rely on other technologies.
One that comes in mind is Java, it is nearly as widespread as JavaScript is and programmers can rely on extensive library support. Java is currently seen a bit as an overkill, slow and useless among many users, but it is a powerfull tool to create thin client applications, that is to say that you load the application from remote without having to install a program locally, and just run it off the network.
Thin clients are a new approach, first embraced by Sun Microsystems, that tends to minimize the administration effort, and maximize the user experience, almost exactly what AJAX stands for right now, don’t you think?
Nearly as distributable as AJAX, Java has several advantages, being easily portable, offering modern GUIs and being faster than JavaScript, it may become the successor of the AJAX hype.
Using Java we can easily create complex software that it intuitive to use (as the Web 2.0 phenomenon is experimenting about right now) that scale well, both while developing and once deployed, and gives the developers the power of thousands of ready to use Libraries.

AJAX is here, now, but how long will it stay?
  • Share/Bookmark