scttnlsn / backbone.io

Backbone.js sync via Socket.IO
http://scttnlsn.github.io/backbone.io
541 stars 66 forks source link

Enabling backend definition at instantiation time #49

Closed lemonzi closed 10 years ago

lemonzi commented 11 years ago

Right now you must extend Backbone.Collection to give it a backend. In many cases only a master instance that syncs everything is needed, so I find it easier to directly instantiate it and pass the backend with the options if no additional methods or attributes are required. This is how the native Backbone.Collection.url works, which I think is the natural predecessor of backends. Sorry about the ugly whitespace diff, my editor automatically trims it.

scttnlsn commented 10 years ago

Thanks!