Wynn Netherland changelog.com/posts

Capsule: Realtime web app framework for Backbone, Socket.io and Node.js

The adoption of Backbone.js seems to be heating up. Last week we brought you
Capt,
a command line tool for creating Backbone projects. This week, we
introduce Capsule from
Happy.js
creator Henrik Joreteg. Capsule aims
to let you share view and model code across client and server, with
realtime view updates powered by
Socket.io.

Capsule extends Backbone.Model and Backbone.View with
Capsule.Model and Capsule.View respectively:

exports.AppModel = Capsule.Model.extend({
  type: 'app',
  initialize: function (spec) {
    this.register();
    this.addChildCollection('members', exports.Members);
    this.addChildModel('activityLog', exports.ActivityLogPage);
  }
});

Check the README for server
and client-side setups and other usage.

Caveats and contributing

It should be noted that Capsule currently assumes you want to use
ICanHaz.js and Mustache as your templating layer. If you have other
tastes, perhaps you could fork the
project
and contribute?

[Source on GitHub]


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00