Backbone.js collections are used to store and manage a group of similar or related objects. If all we wanted to do was store related objects we could use a JavaScript array, but Backbone.js Collection provides an infrastructure that allows us to manage the set of data more effectively and efficiently.
As usual, I will attempt to keep the sample very simple. We will focus on collections, but we will need the assistance of models in this example.
In the following example we are creating 2 models and adding them to a collection.
In the first section of the code we declare a Movie model class. There’s nothing special here.
Continue reading “Re-Learning Backbone.js – Collections”