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

Wynn Netherland Wynn Netherland

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

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.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]

0:00 / 0:00