The JavaScript blog.


testing games css backbone.js windows kinect

Kinesis, Lo-Dash, Backbone-Super

Posted on .



When I was growing up I knew a good microswitch when I saw one. I ended up with a formidable collection of joysticks for gaming, but they're nothing compared to the extremes the arcade fighting stick mod community go to. Why am I boring you with my knowledge of awesome buttons? Well, the developers behind Kinesis want to bring Kinect hacking to a wider audience through their new JavaScript APIs.

Right now the SDK requires an invitation to download (really?), but there are some videos of Kinesis demos available now.

In the meantime I'll be standing in a corner with my Sanwa-modded Hori arcade stick playing some real video games.


I saw TJ Holowaychuk mention Lo-Dash (GitHub: bestiejs / lodash, License: MIT) on Twitter:

A drop-in replacement for Underscore.js, from the devs behind jsPerf.com, that delivers performance improvements, bug fixes, and additional features.

There are, of course, benchmarks:

Lo-Dash's performance is gained by avoiding slower native methods, instead opting for simplified non-ES5 compliant methods optimized for common usage, and by leveraging function compilation to reduce the number of overall function calls.

John-David Dalton has posted a video about the project to Vimeo: Lo-Dash's origin and why it's a better utility belt.


Backbone-Super by Lukas Olson adds a super method to Backbone.Model using John Resig's Inheritance script. Rather than using Backbone.Model.prototype.set.call as per the Backbone.js documentation, _super can be called instead:

var Note = Backbone.Model.extend({  
  set: function(attributes, options) {
    this._super(attributes, options);


oo commonjs modules backbone.js kinect

Chaplin, KinectJS, Inject, Minion

Posted on .


Chaplin (License: MIT) from Moviepilot and 9elements is an example architecture using Backbone.js. It features lazy loading through RequireJS, module inter-communication using the mediator and publish/subscribe patterns, controllers for managing UI views, Rails-style routes, and strict memory management and object disposal.

While developing web applications like moviepilot.com and salon.io, we felt the need for conventions on how to structure Backbone applications. While Backbone is fine [...], it's not a framework for single-page applications.

All Chaplin needs is a web server to serve the client-side code. The example app, "Facebook Likes Browser", even includes client-side OAuth 2.0, thereby demonstrating client-side authentication.


KinectJS (License: MIT) aims to bring Kinect controls to HTML5. The author has created some KinectJS demos and KinectJS YouTube videos, so with the required hardware it should be possible to try it out.

The client-side JavaScript is only one part of the implementation -- the other is an Adobe AIR application that provides the bridge to the Kinect drivers. The AIR application isn't currently open source, but the JavaScript code is MIT licensed.


Inject (License: Apache 2.0, GitHub: linkedin / inject) from LinkedIn is a library agnostic dependency manager. It adds CommonJS support to the browser, and the authors have created a Inject/CommonJS compatibility document to show what exactly is supported. Resources can be loaded cross-domain, and the AMD API is also supported. Inject also has a lot of unit tests, written with QUnit.

Once Inject is loaded, it'll find and load dependencies automatically:

<script type="text/javascript" src="/js/inject.js"></script>  
<script type="text/javascript">  

Now if program.js looked liked this:

var hello = require('hello').hello;  

Then Inject will load the hello module.

Inject finds the dependencies automatically and loads them asynchronously. If a developer changes some downstream dependency - for example, changes hello.js to depend on new-name-module.js instead of name.js - your code will keep working because Inject will automatically find and download the new dependencies on the next page load.


MinionJS (License: MIT/X11, npm: minion) by Taka Kojima is a small library that provides classical inheritance for Node and browsers:

minion.require('example.Example', function(Example) {  
  var instance = new Example();

Minion also includes a publish/subscribe implementation. All classes have subscribe and publish methods which can be used to bind callbacks to notifications.

Finally, Minion has a build script that can be used to package classes for client-side deployment.