Javascript – the Web 2.0 developer’s Babelfish

February 12th, 2007

In the post-demo schmooze at Toronto DemoCamp 12 last week, I was discussing Ajax-y things with a few people and I found myself articulating a notion that has been rolling around in my head unformed for a while – that of Javascript as Babelfish.

If you look some of the popular Javascript libraries and frameworks, an important aspect of their design is to make one’s Javascript code feel more like another environment that better suits the application or in which the designer (and ultimately user) is fluent.

To be precise, GWT is actually written in Java, so it doesn’t fit exactly but continues to demonstrate the trend of people wanting to stay in the environment they understand but have Javascript do the work.

Javascript is remarkable in its flexibility of expression that allows you to apply it to various idiomatic styles. I can’t think of another language that would be quite so accomodating.

Is this trend indicative of Javascript’s power, or the ingenuity of developers who are stuck with using Javascript in the browser when it differs from their environment of choice?

2 comments to “Javascript – the Web 2.0 developer’s Babelfish”

  1. […] Old Ajax hand Brent Ashley has broken what I can only hope was a self imposed silence today with Javascript – the Web 2.0 developer’s Babelfish. I must say I agree with Brent’s “unformed” idea: some of today’s popular JavaScript libraries try to make JS “feel” more like a different language. I make this point when I talk about Ajax or when people quiz me about which library is perfect for them – if Ruby makes your skin crawl, chances are you won’t like Prototype and many of the Java guys I know adore GWT since it allows them to stay in their comfort zone. […]

  2. I feel that this is one of the fundamental problems with many of the JS libraries out there – they try to force JS into the mould of some other language. The result is that developers who use these libraries don’t really get to grips with the true nature of JS, which can only hamper them in the long run. (Well, those who look under the hood of their chosen library will find out how to make JS fly, but that’s very few of the people using these libraries.)

    Personally, I’ve been perfectly happy to use JS as JS for the last ten years, and I really don’t see any benefit in pretending it’s something else. It’s like those people in the 80s who added support for infix notation to Forth: they didn’t appreciate the power and flexibility provided by Forth’s native use of Reverse Polish and ended up crippling themselves in their use of the language.