Thursday, March 17, 2005

Ajax is Nothing New

There's suddenly a load of fuss in the java world about Ajax. This is a supposedly new way to create responsive web apps - you basically use xmlhttp from client-side script to connect to the web server, obtain data, then display it - i.e. there's no full-page postback, so it leads to more responsive web apps. Google Suggest uses it to fetch search suggestions as you type.

But hang on a minute - we've been able to do this for at least the last five years; & it's not just a java thing - MSXML gives us this capability, as does the Web Service Behavior. ASP.NET 2.0 will support it, too, and the emitted html and script will apparently be cross-browser compatible.

Basically, "Ajax" is just a new name for old stuff. I guess by wrapping this up with a new buzz-word it will begin to hit the mainstream, and so you'll see more sites using it. It does make web UIs more responsive, especially where you're creating data-centric applications and users are keying in a lot of data. Unfortunately it leads to a phenomenon I call the "JavaScript Fat Client", where you wind up with more and more UI logic in the client-side script (because it improves performance), so you lose your nice thin client. It also masks a fundamental flaw in some apps: if you need a fast, responsive UI where the user is keying in & retrieving shed-loads of data, then the app should be a thick client, not web pages.

"Ajax" is nothing new to web devs in the Microsoft world; we've been using it for years to get around the problems of creating a responsive UI with web pages. In fact, we've already moved on to Smart Clients - the real next big thing. Trouble is, I don't think java can really do smart clients, hence the need for them to cling to web UIs.

3 Comments:

At 8:06 am, Anonymous Anonymous said...

http://blogs.msdn.com/dphill/articles/66300.aspx

In reading this description of what a "smart client" is I'm curious. You said:

"Ajax" is nothing new to web devs in the Microsoft world; we've been using it for years to get around the problems of creating a responsive UI with web pages. In fact, we've already moved on to Smart Clients - the real next big thing. Trouble is, I don't think java can really do smart clients, hence the need for them to cling to web UIs.

Java has had "Java Web Start" for years. How is a "Smart Client" any better/different? Also what is your basis for statement about Java not being able to "do smart clients"? Is it a lack of understanding/experience/knowledge of the Java platform, or is it actually something insightful? Since Ajax has nothing to do with Java (javascript is not Java, not even close) why would the Java world be all aflutter? I'm wondering what part of the "Java world" are you tapped into that would give you such an idea? There seems to be a broad interest in the AJAX methodology (yes it's a methodology, not a specific product) across the developer world, I would hardly say it's only limited to the Java community.

 
At 2:29 pm, Blogger Adam Young said...

Hi "Anonymous"; you raise some interesting points. I assume you're raising them because you've already taken up the "Ajax" torch because you're using the underlying technologies (or thinking about using them), and not just because I dared to criticise Java!

Here's my response in random order:

1. You're right, it's nothing to do with Java per se (and I didn't actuallly say that - take a deep breath, count to 3 and read the post again): it's a methodology; but you won't find anything about it on MS-oriented tech web sites, because it's really not a new approach at all. To repeat: it's just a new *acronym* for something that's been around for at least five years or more.

2. ("I'm wondering what part of the "Java world" are you tapped into... ") For the last 21 months I've been working primarily with Java devs - so I like to keep my oar in with what you lot are up to.

3. ("There seems to be a broad interest in the AJAX methodology (yes it's a methodology, not a specific product) across the developer world, I would hardly say it's only limited to the Java community.") - I disagree; I think it's currently only in the Java community you'll find this - tap into the MS sites & blogs and you'll see that, if anyone is talking about it, they're just shouting about how this is nothing new and that it's something we've been doing with MS techs for quite a long time already; you'll also see references to MS Outlook Web Access, which makes heavy use of this approach to eliminate postbacks. See: http://blogs.msdn.com/adioltean/archive/2005/03/18/398472.aspx for an example, and links to other blogs.

4. ("Also what is your basis for statement about Java not being able to "do smart clients"? Is it a lack of understanding/experience/knowledge of the Java platform, or is it actually something insightful?")
Yes, I'm aware that Java is capable of producing rich clients, and also self-updating rich clients; unfortunately Java's UI toolkits suffer from the perception that they just ain't that good; they tend to be slow, sluggish and quirky e.g. Swing - this isn't just my opinion - there's no-one I work with currently (all experienced Java devs & Linux Zealots the lot of them) that have anything good to say about it. I'm aware they're getting better, but Java UIs will continue to be web apps for the foreseeable future. I know of at least two large banks that are in the process of abandoning Java for the UI, in favour of .NET rich clients.

5. ("Ajax has nothing to do with Java (javascript is not Java, not even close)") Yep, we all know that (I've used JavaScript since 1996 & I know first-hand the confusion caused by Sun's decision to rename LiveScript to tie it in with the Java hype). The fact that JavaScript isn't Java is part of the problem - you may think "Ajax" is a great idea, and it looks it on paper; you can achieve some great results with it; unfortunately, as anyone who's used this approach in anger will testify, it leads to some nasty & difficult to maintain code. A "JavaScript Thick Client".

 
At 7:32 pm, Blogger Joe Miller said...

Thanks for the frank discussion. I describe similar experiences here.

This is exactly the kind of edgy conversation that we had in our organization when it was proposed that we start work on a .NET smart client. Swing doesn't cut it, JSP (with heavy JavaScript) _barely_ cuts it. Now we like to think that we take best-in-class technology and use it appropriately.

An Application Developer's job is to provide the best user experience possible. It's a mistake to dismiss any technology based on rhetoric.

 

Post a Comment

<< Home