So Much Win at JSConf 2009

Offered for your approval, one attendee’s observations of JSConf 2009, held this April in Rosslyn, Virginia.

First, propers are due to Chris and Laura Williams for setting this up. A conference for javascript is an idea whose time has come. The speakers were outstanding. The food and after-party were fantastic, too. If there’s a JSConf 2010, I’ll be the first to sign up.

In General

A few trends emerged.

First, lots of javascript developers love Cocoa, the application API/environment for the MacOS that descends from Steve Jobs’ mythical Next boxes and allows developers to connect components (literally, by drawing lines between their icons on the screen). These developers want to bring the same philosophy and capabilities to JS development.

Second, the party’s on github. In about 2 years, git has gone from nowhere to everywhere. Just about all of the new software presented is open source, so attending the conference amounted to being offered excellent, and free, tools. Take this awesome framework, please!  At the same time, taking advantage of these riches means git is essential. Learning how to fork and patch git repositories is now crucial for a developer who wants to make a commitment.

Third, WebKit gets the prize for our favorite JS engine (not surprising with all the Cocoa love being shown), although SpiderMonkey and Rhino had representation.

Fourth, some things have gone way out of favor. AJAX is now a dirty word (it might be the X bit — no one likes XML), and the Prototype framework gets no love at all. Sorry, Brian, but Prototype’s functional programming support is phenomenal. A built-in tmeplating language? And the ‘wrap’ function, opening up all of Aspect-Oriented Programming with one function? I’m telling you. But it was mostly JQuery, which is great too. And JSON is huge, which makes me happy. It’s great to see simplicity triumphing.

Fifth, I’ve discovered there’s a monthly javascript magazine: jsmag. We got a complimentary highlights issue with articles on functional programming and object literals.

Finally, twitter is for reals, y’all. Everyone at the conference had a name tag with their name, an optional company, and a twitter handle. I’m tracking these people down as you read this. As you may notice, I’ll be linking people’s names to their tweet streams where possible.


The first speaker, Francisco Tolmasky of 280 North, presented Cappuccino and Objective-J, the former being a rich media framework built on top of the later, a language built on JS as a strict superset of JS. What struck me most about Tolmasky’s talk was his frustration with waiting for the ECMA standards group to give us a better language. He and his team got tired of waiting. He also made an excellent point about the current JS frameworks, as good as they are, requiring the coder to think about structure. The base language should take care of structure, he argued, and you should have libraries that deal with application logic. So, being former Mac and iPhone coders, they built a language that implemented the Cocoa API interface, but in Objective-J. The demo was impressive: lots of drawing lines between icons and rich behavior suddenly happening. Cappuccino is on github. Even the very fine-looking branding and icon imagery 280 North had done will be open sourced. Open source Photoshop docs. For real.

Ian Smith began his Taffy DB talk by saying he wanted to focus on the “trunk” of the webapp tree—the place between the data-layer roots and the user interface canopy. Taffy DB takes advantage of one of my favorite things about JS, that (nearly) everything is a hash, to use a nested object literal structure to represent data. Then he puts lots of search, select, and display functions over that. So your data is available client-side. He was asked about transaction support. It isn’t there yet, but could be. I was reminded of Clojure’s STM, which guarantees atomicity for its data objects, the most common of which is the very JS-like data map. Not that Smith needs to worry about any of the other issues the STM addresses, like multithreading, but it’s an interesting connection. I also applaud him for building his system up as need demanded and not being afraid to admit he started very simple, with arrays. We’ve all been there. It’s inspiring to see a smart person take it a lot further.

A lot of people at the JS Conference want to put JS in places it hasn’t commonly gone before. One such place: into desktop/device applications. Jeff Haynie of Appcelerator introduced Titanium, an open source development toolkit, available from github like so many of the projects shown. It’s a competitor to Adobe AIR: it allows you to develop with javascript by exposing JS objects that represent the filesystem, processes, ui, media, database, and networks. Security is not built-in. You have to take care not to hang yourself with all the rope Titanium gets you. That’s a choice Appcelerator’s made to offer the developer more freedom. They also allow you “bleeding edge” HTML 5 features, via WebKit. WebKit is going on my short list of things I don’t have time to learn but should. Very impressive.

Two guys from CouchDB, Chris Anderson and Jan Lehnardt presented a sort of unpresentation, with hand-drawn slides that make our beloved why the lucky stiff‘s stuff look like da Vinci’s. They mostly talked about what Couch DB is, hinting at the freaky Erlang magic that allows it to scale ridiculously well, and the philosophy behind it—namely that you should forget about types and schemas and think in terms of flexible documents, not tables. Applications are data now, Chris said. You configure the apps with JSON and write javascript to build views and transformations, namely mapping and reducing to isolate and summarize aspects of your data. He hopes CouchDB will help usher in the “peer to peer web” and that CouchDB will lead to lots of kids getting in trouble for hacking their applications. They didn’t really show us any code, but promised to come back on Day Two with a track B talk.

Andrew Turner talked about using javascript to drive immersive simulations, heralding the much-belated arrival of virtual reality for, if not the masses, then at least for reasonably skilled developers. He’s using the Spidermonkey engine to connect javascript to SimCreator, a VR and simulation software suite. He demo’ed using JS to configure landscapes, sensor placement, and behavior definition. I was struck by two things: first, that he argued that going to javascript was going to a high enough abstraction layer that the clients he was working with could program the simulations themselves; and second, that this stuff was being used not just to make cars safer or make engineers lives easier but also to train soldiers—now javascript can help kill people just like grown-up languages.

Nick Campbell came next, presenting Axiom Stack, which lets you write server-side javascript that executes on the JVM courtesy of Rhino. There’s a built-in Lucene search layer. Queries to the server are in JSON. The most interesting aspect of Axiom is its adoption of the “prototype” model. In setting up your application in Axiom, you define the properties of prototypes. Javascript’s prototype-based OO model did not get much love at this conference. Most folks want a class-based regime. But properties-focused programming really has its merits, and JS offers it up in all its glory.

Then there were a few lightning talks. What I recall best is Chris Williams’ recollection of his erstwhile “Dissident” program, which sought to push more power (and computation) from the server to the client. I am deeply sympathetic with this view, and I think it’s going to win in the end. Hang in there, Chris.

Jack Moffitt‘s XMPP talk, “The Real Time Web with XMPP”, covered two topics. First, the nature of the eXtensible Messaging and Presence Protocol; and second, strophe.js, a javascript library for writing XMPP clients. I didn’t know jack about XMPP before this talk, and now I’m thinking about all the possibilities it opens up for some projects I’m involved in. With XMPP, instead of repeatedly polling a resource for information (e.g. sending an HTTP GET request to a web server), your client sends a request for the server to fire back new information when it actually has it, and the TCP connection stays open until that happens or a time-out period expires. The information on the wire is an XML stream: an XML document that isn’t complete until the connection is closed. So you think in terms of queries (for presence and service) and callbacks for different responses from the resource. Strophe lets you do all this with javascript. All those XML “stanzas” (my heart sinks just typing that)—you can compose JS object literals and Strophe will do the XML for you. And, happily, there are plenty of convenience methods with dollar signs in them.

Finally, John Resig of jQuery and all-around code ninja fame took the podium and talked about performance testing (count method calls, not just milliseconds per function), JS for games (latency precludes accuracy games, and ease of cheating rules out knowledge-based games, but team-based time-limited challenges have promise), and distributed testing (let my JS run in your IE6 client, willing zombie, and I’ll give you a free mug). A melange of topics off the top of his head—nice way to end the day.


I didn’t make it to the Friday night party, but apparently a lot of attendees went and had a very good time. The first presentations the next morning were rife with LOLcats and cursing, which are about as good for a hangover as greasy food. James Duncan of Joyent went first. He provided the drunk LOLcat. He then suggested that just as electricity was once not considered a utility but eventually became one and did away with all the factory steam engines, privately maintained servers would soon start to disappear from company’s budgets. Managing machines, Duncan asserted, is nothing but a liability: “It gives you no competitive advantage.” Joyent offers its users awesome libraries (running in SpiderMonkey) that let you interact with HTTP request objects, data sources, and XML/HTML in idiomatic javascript. Think system.datastore.write... and function() { <html><body>I'm writing HTML right in javascript! So much win!... }. I was astonished by one small point: when you write a function to match a request, you can specify two args. The first is a regex. The second is a named variable into which the results of the regex match are magically placed. WTF? How do they do that? Though not available yet, the Smart platform will be open-sourced in the near future.

A conference without cursing presenters is like a beach without sunshine. Brian LeRoux, contributor to PhoneGap brought the F bombs. He also made some satisfying assertions and drew lines in the sand. He said, Objective C is not cool. We’re not desktop programmers. He said the purpose of PhoneGap was to bring about a day when PhoneGap could cease to exist. He also claimed that a mobile app built with PhoneGap was indistinguishable from a native app. He also also argued that one should try to build his own framework before picking another one to use. I haven’t explained what PhoneGap is, because everyone there knew already: it’s a framework that lets you write an app once for all the mobile devices that support WebKit (it strikes again)—that means iPhone, Android, Nokia phones, Palm Pre, and even Windows Mobile devices. (Although LeRoux pointed out that no one is sure about the Windows Mobile because no one actually owns one.) It’s teh shit. In fact, it’s so hip that its naming convention for success and failure handlers is to call these functions win and fail. In the future, LeRoux promises PhoneGap will come with an open tool chain, Gecko rendering on top of WebKit, a better simulator (possibly to be named “Stimulator”), integrated Firebug Lite for debugging, speech recognition, sockets, FileIO, Facebook connections, native controls, and hoverboards. An entertaining talk. And an enlightening one. Did you know Nintendo is preparing an app store?

Kris Zyp of SitePen came up next to discuss end-to-end javascript. This means using a framework (in this case Dojo) on the client side to communicate with other resources via RESTful calls and resource discovery, and with JSON as a format. On the server side, it means their Persevere thin server for data storage, which keeps its programmer “in the object realm”. The structure here is the object literal, supported with some special magic for referencing parent (i.e. containing) objects and other objects. Concerns are separated, latency reduced, exploits precluded, and interoperability increased this way. I really liked Zyp’s call for the data “on the wire” to be data and on-demand application code. Awesome. And dynamic subclassing (an alteration to a superclass bubbles into subclasses immediately), clean and usable HTTP inspection tools, and a javascript&ft; prompt on your server. Very awesome. Defining your data schema in JSON? Priceless. I’m getting a bit carried away, I like it so much. In questions, Zyp added that lightweight type constraining was certainly possible and encouraged where necessary, and mentioned Yahoo’s InputEx, which builds forms via JSON.

The CouchDB guys drew a lot of people, including me, to their promised track B talk. I have to confess I understood a bit less than I hoped to, but I did get that views pull together selections and summaries from documents. This seems very natural. After building web sites that are 99% concerned with text on top of databases meant for analysis and reports, things are finally starting to make sense. Once again, REST and JSON rode tall as the dominant AOFLs (Acronyms Of Four Letters), supplying the means by which you query and update. Just one nit to pick: I don’t like magic comments in the code. Like // !command Don't delete me or you're screwed.

I liked Jason HugginsSelenium talk, although it didn’t make me any more willing to dive into the incredibly complicated undertaking that writing Selenium tests seems to present. I was more encouraged by the future. Brendan Eich’s bodacious (but Mozilla-specific) Narcissus meta-circular JS evaluator has been made broader and more usable as something called Narrative JS. I also think the Castanaut project, bringing screencasting and functional testing closer together, is a good development.

Next I was dazzled by Richard Worth‘s walk through JQuery UI‘s many interactions and widgets. It was like getting your hand held and led through the API docs. I think I’ve lived with Scriptaculous long enough. It’s time to make a move. The theme roller, in which you can configure, preview, and then download as CSS an entire site theme, is very cool too.

Then it was time for SproutCore, presented by OtherInbox representative and Charm City native Mike Subelsky. The bezier curves were flying and flexing as he took us through an example of the “desktop-like” applications that the framework makes possible. Like Cappuccino, SproutCore is inspired by Cocoa. It promises to give you as a developer access to the things a desktop developer has. In particular, Subelsky pointed out the value of Key-Value Coding and Key-Value Observation. Controllers manage collections or selections of objects, and a chain of scope is established from the view up through the controllers. Setting a value fires events you can bind to. Plus you can bind your own function calls to values named by key. Very nice.

My apologies to Peter Higgins, who gave the last talk of the day on Dojo, but I had to run out early to get ready for the party. Traveling around DC on the weekend by Metro is slower than it should be.

All in all, a great conference, and an invaluable opportunity to meet people and learn about projects to watch. I think attending JSConf will pay me back handsomely in the days to come. Chris Williams has put up photos of the conference on Flikr, if you’d like to see what this looked like. There will probably also be videos and slides soon.

3 thoughts on “So Much Win at JSConf 2009

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.