JavaScript meetup @ Google

Jan 25th, 2009

The Mountain View JavaScript Meetup Group kicked off their 2009 season @ Google (Googleplex in Mountain View – building 43, Tunis). Trevor was the resident Google employee that hooked up the conference room. Nicholas Zakas of Yahoo! gave a talk on the performance of local variables vs. global variables in JavaScript. Lesson? Use local. In fact, inside of a function, if you refer to an object/variable outside the scope of that function several times, it pays dividends to assign a local variable reference to that object, and call on that local reference instead of multiple calls to the outer-scope variable. Other languages, he points out, have the advantage of automatic compile-time optimizations; however, it’s up to coder in JS to optimize the code. So, rather than just accept the fact that “local vars are faster than global vars“, he proved it with tests across several platforms/browsers, and showed interesting graphs.

Davey Waterson from Apatana (of Ruby/Rails IDE fame) presented on ActiveRecord.js. Very cool and easy way to hook into databases in a cross platform manner in JS. Getting and setting persistent data across JS to a client or server is quick and dirty with ActiveRecord.js. It’s cross platform, cross browser. Easily connect to SQLite or even MySQL using Jaxer, Apatana’a Server-Side JavaScript engine. I use Aptana IDE (an Eclipse derivative) for Rails development in Linux, as a side note, and it’s quite sharp. Man alive, that’s three versions of Eclipse installed on my laptop.

Last talk was given by Tom Robinson of 280 North. He spoke about his port of Rack (minimal interface between webservers supporting Ruby and Ruby frameworks) into JavaScript, called Jack (on Github). I’ll let you check out the Github page for a better explanation of what Jack does for you, and spare you the cut-and-paste.

I liked having the meetup @ Google because there’s already plenty of people on-site to attend, and that made out of some quality Q&A sessions. Okay, I like the smoothies in the lobby, and snacks dispersed around the office too.