How did JavaScript kick Java’s ass?

Stumbled across a tweet from Brendan Eich today that featured a link to an interview about JavaScript back from 2008. Studying the past can lead to interesting things so I decided to read along. One paragraph caught my interest…

“We saw Java as the ‘component language’ used by higher-priced programmers, where the glue programmers — the Web page designers — would assemble components and automate their interactions using JS.

This division of labor across the programming pyramid fosters greater innovation than alternatives that require all programmers to use the ‘real’ programming language (Java or C++) instead of the ‘little’ scripting language.”

Well, the times are changing. I wouldn’t consider JavaScript being a little scripting language these days. And with Web Components, one of the latest additions, to the browser ecosystem this vision of glueing components together will somehow come true. But without the main player people envisioned back then, without Java. I found this to be interesting and I would like to understand the mechanics behind this change? How exactly did JavaScript kick Java’s ass?

Don’t get me wrong I don’t want to dive into comparing the two languages. It’s not what interests me at all. It has probably been discussed on stackoverflow a thousand times. The question that I would like to think about is: How could this little scripting language oust another language which was somehow considered superior back then? Hm, what about…

Ease of use

No compiler. No SDK or JDK. No Classes. Scripts just run in this thing called browser. You can even just open the console and start manipulating a web page. Getting up and running is so much easier with JavaScript. I think this factor is underestimated a lot and it’s one of the reasons for the success of the Processing platform. It enables people who just want to start creating to do so.

Focus on UI and interaction

Java didn’t take the user interface seriously. Creating awesome user interfaces in Java has always been a pain. There where different libraries (Swing, AWT, etc.) that you could not customize at all. How in the world would you create a Web Component with the help of a Java applet? Good luck. In JavaScript land things were a bit different. The declarative style of HTML and CSS prove to be a good fit for creating UIs. JavaScript just added a little spice on top of it.

So what does that all mean?

Well, I actually don’t really know. Maybe I’m just happy that we (hopefully) agreed on JavaScript being the standard language for UI-Coding of the future and we can now move on to solve the real problems. At least that’s what I hope.

Leave a Reply