Friday, April 1, 2011

JavaScript... my old flame

I love JavaScript. I have loved it since I first learned it in 1996 from Danny Goodman's JavaScript Handbook. It's just such a fun language to play with.

However, I've spent too much time away from JavaScript and too much with Java, which I never really loved and can't wait to get away from. Most of my IT career has been with Java because that's what everyone was doing, that's where the energy was, where the robust tools developed, and of course where the big money was.

But I'm glad that people are finally realizing Java to be the tedious, overbearing language it has always been. Everywhere now I hear talk of how much "boilerplate" and "ceremony" must be done in Java to get things done and how to avoid it with new languages like Groovy and Scala. Everyone wants to write less Java code! I haven't learned the new language flavors yet and I don't know if I will. My true desire is to get back to the language I loved years ago for its simplicity, fun, efficiency, and (to my surprise coming back to it) power. With functional programming and closures all the rage, JavaScript is becoming cool to program in and people are taking it seriously. Funny how attitudes change.

At a fairly well-attended seminar around 1999 (I forget exactly which one), I asked the presenter about server-side JavaScript, which Netscape was trying to launch at the time. He laughed and said, "No one wants it! It won't happen." JavaScript was doomed on the server and killed off presumably by Sun who conquered that space with Java. (I've come to learn that Netscape and Sun were not necessarily on good terms.) It also could have been that JavaScript wasn't mature enough at the time or simply that people just didn't recognize what it could do. In any case, it was reviled by 'serious' programmers and ignored.

But, being the scrappy language that it is, JavaScript survived fantastically in the browser space and--after a resurgence with Ajax, JSON, and various UI frameworks--it's now making inroads in mobile devices and, finally, server side! It looks like server-side JavaScript might have a real chance with Node.js and associated frameworks. I'm just beginning to check that out and I'm astonished at the performance metrics. Almost as fast as C! And it will only get faster as compilers get better.

After about 10 years of putting JavaScript on the back burner out of career necessity, I'm happy to see it doing so well and growing in popularity and respect. I'm having fun learning jQuery and Prototype and I look forward to using JavaScript in mobile, server, and other environments. It's nice to get back with JavaScript. It has a bright future that I want to be a part of... and programming will be fun again. ;)