What is Supermodel ?
Supermodel is a special kind of Model that provides the model instances tracking for Backbone. Model instances with the same "id" derive from the same Supermodel class and could be treated as the same model by Supermodel. This is a kind of tracking that reduce unnecessary model copies. Models that shared with the same "super" ancient are stored within a Backbone.Collection and accessed from Model.all() function. Say if SModel = Supermodel.Model.extend(); then all instances of SModel are putted into the SModel.all() collection. It could raise some problems while you want to make these instances a collection (talk about it later).
A Supermodel class can also be inherited from another class like ModelB = ModelA.extend(); then ModelB owns properties and method of ModelA now. Do not rub out possess of the parent Model while you want to add some properties.
Like Backbone-relational, Supermodel provides "Has One" or "Has Many" associations. Models reach out each other through a property that concat the name of the relationship with "_id" suffix.
Why not using Backbone-relationship ? 1. BR takes 60+kb spaces while Supermodel just takes 20kb. 2. BR must be declared globally that cannot work with common.js or AMD.
Tricks on using Supermodel
1. Supermodel promises that each instance is saved into a predefined Collection for tracking so model.collection has to be fixed with that. This could be a nightmare when working with some other backbone plugins (ie. LocalStorage Adapter) say you create a collection for some Supermodel instances and set a localStorage property, and model.collection would never point to it!!! (I've live through my all-night headache debugging).
2. Another problem is associations get broken up as you override initialize(). This issue has been raised on github and solved by running "Supermodel.Model.prototype.initialize.apply(this, arguments);" at first in initialize().