addyosmani/backbone-fundamentals — Issue #17: Unsure about things in the Collections section
Author: city41
Created: 2011-12-23 02:20:13+00:00
State: open

I found the Collection section a bit confusing.

This code

`PhotoCollection = Backbone.Collection.extend({
model: Photo
});`

Feels to me like you are defining a type fo collection. To actually use a photo collection I'd assume you have to new one up first. The capital letter in the variable name also seems to imply `type` to me. But you immediately started using PhotoCollection in the next code sample. So I guess extending Backbone.Collection gives you a collection object to work with immediately?

If that is the case, then later when you say `var photoCollection = new Backbone.Collection([a,b]);`, I guess you are newing up a base, generic collection. Why would you not say `var photoCollection = new PhotoCollection([a, b]);`?