Is JavaScript Overrated?

Con-way graciously sent me to RailsConf, and even paid for the tutorials. I went to Thomas Fuchs’ morning tutorial “JavaScript Overrated? Or: How I Stopped Worrying and Put Prototype and script.aculo.us to Full” but I left after the first coffee break. Thomas is obviously a bright guy who’s done some great work with script.aculo.us, but his talk is pretty underpowered for a big room. A bit disappointing — lately I’ve been thinking that I haven’t given Javascript a fair shake. I could be convinced that Javascript is a dynamic OO scripting language that’s gotten a bad rap. Anyway, here are the high points:

Thomas assured us that lots of big companies use script.aculo.us and Prototype.

The Javascript libraries aren’t that big: the compressed version is 31K. And most everyone uses gzip compression on their web server, right? Uh, I don’t. Behind the times again.

I actually like that there is no script.aculo.us roadmap. “It’s done when it’s done.” It’s funny, I was going to make a joke about trying to implement that methodology at Con-way, but when I thought about it again, I wonder: don’t we do it that way anyway? We come up with big plans and schedules ahead of time, miss our targets, make excuses, and then … deliver it when it’s done.

Anyway, here’s script.aculo.us manifesto: Real-world. Small is beautiful. Ease development.

I don’t know why I hadn’t realized this before, but here’s the nut of how to do an AJAX request with prototype:
new Ajax.Request(‘/some_url’)
The server sends Javascript back and Prototype evaluates it.

Features in the new 1.5.1 release
– speediness
– CSS 3 selectors
– times() for String, padded strings
– use “return” instead of throw $continue
– Fix some Safari crashes
– JSON love

The official JSON library breaks Prototype.

Future features
– read/write attribute
– basic DOM builder
– wrap()
– curry(): like find. Huh? I should have paid more attention.
– defer()
– delay()

Another random observation — there are maybe 200 people in the room, and 95% have laptops. And most are MacBooks. My superficial impression is that the attendees are more stylishly dressed that they were at JavaOne.

There’s much more interesting conversation here at one of the tables outside the tutorial room (and free coffee). Someone’s “friend” is responsible for one of the largest Rails sites’ in the world: Paris Exposed. He handled a huge spike in traffic, and the only thing he need to do was switch to better session handling code. So when people tell you that Rails doesn’t scale, you can always say: “Well, what about parisexposed.com?”

Now the table has been highjacked a Microsoft IronRuby evangelist. He’s really worried that people will ignore Microsoft’s cool Ruby VM because we all ‘hate’ Microsoft. I am not sure that anyone here ‘hates’ M$, but this guys’ style is just wrong for us. It feels like he stumbled upon the wrong conference. Though it is cool to see a 17″ PowerBook with Microsoft corporate asset ID.

Leave a Reply

You must be logged in to post a comment.

gears