Wednesday, September 06, 2006

Me and my jurassic Java

Last time I did any Java programming was way back in 1996. I did most of my work on Java applets and used the ancient JDK 1.0.

I did some pretty fun applets back then. I did a dialogue-based travel search called the Automated Travel Assistant that used live data screen-scraped in real-time from ITN.net (it really worked, screenshots in the UM '97 paper). I did an applet called WebView that would multi-thread crawl and display web link graphs in real-time around a URL or search terms (the look-and-feel was similar to what you can now see at TouchGraph). And, much more of a toy project, I did a little LGrammar drawing program.

In those very early days of Java, these chunks of code were some of the biggest applets around. That this is true says more about the state of Java back then than anything else.

Having been away for a decade, I recently decided to go back and look at Java again. I was surprised by how many things for which Java was promoted back in 1996 have now been dropped.

The biggest is applets. Applets are no longer emphasized as part of Java, having been supplanted by Flash and, more lately, AJAX. Way back in 1996, Java was heavily hyped for two reasons: the promise of making the web dynamic and of being platform-independent. Only the second seems to live on.

There are many more changes. The AWT was entirely rewritten back in JDK 1.1 (which, at the time, broke all my applets). There were many new libraries and interfaces added, all kinds of beany, swingy, enterprisy things.

In the most recent versions, the language even went back on some of the simplifications that were much touted by the authors of the original JDK 1.0. To name a few, there used to be no templates (which can be ugly), no enums (which, they claimed, are unnecessary syntactic sugar), and no non-blocking I/O (which, they argued, should be handled by blocking threads instead). All of those are now offered as part of JDK 4.0 and 5.0.

It is interesting to see how far Java has migrated since its early days.

4 comments:

Ola said...

Java is getting crazier by the second. It's adding closures in JDK 7. Then, it'll be a real beast.

Tom said...

And, most significantly, Java became "the COBOL of the 90s" as an acquaintance put it.

Daniel Lemire said...

I'm not sure I see why closures are a bad idea.

Also, Java's generics (the equivalent of templates) are actually, from a programmer's point of view, quite sane. Well, at least better than what we had before.

I'm not strong on Java though. The main thing is the requirement to have one file per public class. I just dislike having 32 files for a dead simple program.

But I can see the value of it when you work in big teams. I just have no taste for programming in big teams or for using fancy IDEs with (gulp!) wizards.

Greg Linden said...

Oh, I don't think anyone is saying closures are a bad idea.

I think we're merely commenting on how Java has been extended -- some might say bloated -- over the years, a retrospective look at what Java was and what it has evolved into.