Try out our recently released Firebug extension - Backbone Eye : Understand Backbone application behavior without debugging JavaScript!


Associations allows Backbone applications to model 1:1 & 1:N associations between application models and collections. More importantly, applications can listen to any kind of change (change, add, remove, reset, destroy) in this hierarchy using standard Backbone events and respond to them. (views can re-render for example). The implementation strives to be tiny (3.6KB), easy-to-understand, light-weight and fast.

Web applications leveraging the client-side-MVC architectural style will benefit by using backbone-associations to define rich application structure.

It was originally born out of a need to provide a simpler and speedier implementation of Backbone-relational.



Backbone-associations v0.6.2 works with Backbone v1.0.0+ & Underscore v1.4.4+.

Web page :
<script type="text/javascript" src="./js/underscore.js"></script>
<script type="text/javascript" src="./js/backbone.js"></script>
<script type="text/javascript" src="./js/backbone-associations.js"></script>
Alternatively, cdnjs and jsdelivr has also hosted our library.
See this recipe

npm :
npm install backbone-associations

bower :
bower install backbone-associations

jam :
jam install backbone-associations
If you like or use the library, do show your appreciation by starring us

Next Steps

  1. Learn how to specify and navigate association hierarchies.
  2. Learn how to listen to changes in the association hierarchies.
  3. Go through a comprehensive tutorial.
  4. See real-world recipes contributed by users.