NebraskaJS Logo


Ampersand.js Lightning talk

Presented, Written by Mike Macaulay

  1. Mike Macaulay Mike Macaulay

Ampersand.js is a new take on Backbone.js. Backbone is super simple, and super flexible, you can do just about anything with it, but its so simple that most people can't really build a full app out of just it. They bring in helpers and a lot of plugins to do things like data binding, nested models, and view management.

Ampersand.js takes the base backbone models and views and brings them up a notch. The creators basically decided that people always want some features and you might as well put them into the library. So you get built-in data-binding to your views (yay!), you get computed properties, direct property access, child models and collections, validation and much more!

At the same time, they also pushed simplicity even further by breaking up the different backbone concepts into separate, tiny modules. Need a simple and powerful event system, try backbone-events-standalone, Need just a model, ampersand-model is for you. In fact, they're managing a whole list of useful tiny modules here.

The coolest thing (IMO) about ampersand is it's upgrade path. You can use ampersand-models in backbone collections! You can use ampersand-views in marionette layouts since they are inspired and use a very close API. This means if you have a backbone application, you can start using ampersand gradually and see if it's a fit for you!