Webreakstuff's blog on design, development and strategy. Click here to subscribe.

Ajax, Java, and a huge misunderstanding

Fred Oliveira on May 25, 2006

Java Tim O’Reilly has a post on the O’Reilly Radar that caught my eye today. He mentions how Java developers at the JavaOne conference showed signs of (and I quote) “envy and angst” against Ajax, and follows that with “Java had the vision of rich web apps long ago, and is still a great platform for building network-enabled apps with great front-ends”.

Now the misconception here isn’t that Java is a great platform to build applications front-ends (network-enabled or not), but that it can be compared to Ajax. The two can’t be compared for several reasons. Here’s two:

  • The technologies behind Ajax alone (XML, Javascript) are not enough to build an application. Ajax is a means to an end - or part of it. It depends on other code layers, both for data presentation, as well as application flow - and those aren’t Ajax at all. Thats why you don’t see web apps purely based on it - it’s simply impossible.
  • The percentage of Java (some people still confuse Java with Javascript) being used on the web is declining, and has been since alternative - and far lighter - technologies (like Flash) came along that removed the need to load a JVM to do what Java used to do. In fact, why would I, as a developer, pick Java over anything else that allowed me to do the same thing and not frustrate my users by slowing their machines down a notch?

Tim O’Reilly concludes the post with this sentence:

It’s impossible to think through what people are going to want to do until they start doing it, so sometimes it’s best to seed the market with a hack that gets people going, and then follow up as you watch what they do with it.

Tim, the major problem here is that the time for Java-based front-ends on the web is gone. Others have emerged in this space and took its place, not because they were “hacks”, but because they were better solutions to the problems developers faced. Why should anyone change from Rails+Ajax (or anything else+Ajax), Flex or anything else to Java? What does it really have to offer that we haven’t seen before?

And I mean on the web, Tim. Because the application you mention on your post isn’t web-based. It’s desktop Java, using Swing. There’s no competing with Ajax, or anything else on the web, because they’re not even playing in the same field, here. Let’s not compare Apples to Oranges, or hype technologies because the enthusiasts behind them (which I respect, naturally) are feeling angst for their ball being taken away, not by hacks, but by several other solutions which people have grown to use.

Update:

After reading some comments (and getting some IMs), I realized I didn’t make a proper distinction between what I meant with the time for Java on the web being gone. It’s not the server-side Java I’m talking about. What I *am* talking about, though, is Java as a presentation layer for web applications, the front-end, the frickin’ applets - which is what Tim was talking about as well. This being explained, my point may be clearer.


Comments on this post

Alex Hutton

“envy and angst” against Ajax”

One has to wonder if Ajax wasn’t just a convenient target at the time for Java developers to channel their angst and envy.

Many times it’s not so much the disruptive technology or ideas as much as it is the fact that there *is* a disruption, and they happen to be on the wrong side of that disruption.

It’s interesting that in my experience (small sample size warning) Java developers are more threatened/closed than .NET/C# guys.

Alex Hutton

oops, Left out sentence. A convenient target not only for Ajax but one that represents RoR as well.

flash91

If you need a networked application you can’t beat java. If you need a website, you don’t need java.

If you are trying to use the browser for networked applications - please don’t. I have to use these on a regular basis - they are horrible.

Shopping sites like amazon excluded of course.

Dig

“the time for Java on the web is gone”. Really? :-) It would be instructive if you could substantiate this.

This is truly news for me and my many friends and contacts who develop Java based web applications. If you take a look around you’ll find that Java web development is alive and kicking and will be for sometime.

Oh, and don’t get me wrong. I think it’s great that new web-based technologies are springing up especially for those who feel most comfortable with dynamic languages. There is real renaissance going on right now and we’re all part of it (Java, .NET, Rails, PHP, etc).

Fred

In the post I didn’t highlight (maybe I should have) that I don’t mean web applications based around JWS or server-side Java technologies, but applications that use Java as its presentation layer, which is what Tim O’Reilly’s post talks about. That being said, I don’t disagree with you at all - there is space for java, just not the way Tim mentions it.

google/ebay

someone should’ve told us, since many of our major webapps are java based. so much wide-sweeping statements filled with FUD it’s not worth commenting on.

Fred

Go back and read the whole article. Particularly, the bottom paragraph.

Ken

“Why should anyone change from Rails+Ajax (or anything else+Ajax), Flex or anything else to Java? What does it really have to offer that we haven’t seen before?”

For an answer to this question, go to the link below.

http://code.google.com/webtoolkit/

H

@Alex Hutton
In my experience, C#/.Net guys wear dresses, worship Bill Gates pictures, blow up bridges etc. But I can’t offer any proof.

People are talking about the time of Java as a web platform is gone. When Java is moving strongly into desktop apps (in the enterprise). Its a start. Get off your Kool aid guys.

And Fred, how can you compare Java and AJAX. Do you even know the first thing about programming. Your post is so wrong that I don’t even know where to begin.

Noone has to move from Flex etc. to Java. In fact Java is moving in with Adobe offering strong support for Java. As far as Rails goes, I won’t trust Rails to run multi-million dollar business websites. What with the scaling issues and all. I like Ruby as much as the next guy but the libraries, scalability is just not there. Its good for small proof-of-concept like things, but for heavy lifting, Java would be a better bet.

Fred

This post was specifically against Tim O’Reilly and friends for comparing Ajax and Java. This being said, it either doesn’t say much about your english abilities, or my writing skills. However, since my second paragraph reads “The two can’t be compared for several reasons”, I’m betting on the latter.

Rik Lomas

I can’t see how Ajax and Java would be directly competing with each other. People seem to forget that Ajax and Javascript isn’t just a magic pill - it can’t do *everything* well, especially when it comes to movement, and isn’t meant to compete with things like Java.

I can, however, see how Flash and Java would compete directly. I would prefer using something that doesn’t completely slow down my machine. Java, on the client-side, seems to be going the way of soon-to-be-dead Shockwave, especially now with upcoming powerful but light technologies such as Flex.

Paul Browne - Technology in Plain English

Speaking as a Java Developer:
Java on the Serverside = good
Java on the client side = why bother, when there are better alernatives available.

IMHO, Ajax and Flash beat Java Applets hands down for Web User interface.

Scott

I haven’t worked with Java on the web for over a year (which I know is forever in the tech world), but it certainly would be far down my list for rapid and innovative web UI development (except possibly scalability would be my only real reason to ever choose Java). Java seems better for data-manipulation or intricate calculations that don’t usually go on in the interface. It also seems to have an obscene amount of plumbing in the way of XML files which don’t generally default to useful values. It also doesn’t seem to particularly follow the DRY (Don’t Repeat Yourself) philosophy which I find annoying after using a more DRY framework such as Rails.

I wonder if Tim’s point about “Ajax envy” wasn’t so much comparing Java to Ajax. Perhaps he was comparing Java’s ease-of-Ajax and interface creation to one of the other frameworks (like Rails) and its ease-of-Ajax.

Unless Java has changed significantly, I imagine getting Ajax going involves quite a bit of manual tweaking and headaches to do something that other frameworks are making simple.

Something like Rails comes with the Prototype libraries already there and well integrated. If you’ve designed your application according to the way that is simplest for you (using DRY and partials) then adding Ajax is astoundingly trivial in most cases.

I always felt as though the encouraged way to do things in Java was somewhat at odds with the simplest way to get it done with interfaces. Something like Rails, on the other hand, aligns the encouraged way with the simplest way. It’s quite a pleasant experience not to have to fight against the simplest way in order to do things “the correct way” for once.

Frankly, I hope Java developers do feel “Ajax Envy” since maybe it means they’ll try to fix some of the problems with Java. It’s a free market and if all Java can offer is scalability on the back end and extra complexity, then they deserve to be woken up and get their butt spanked by newer, easier and more flexible technologies.

Something to say?