{"issue":{"title":"CollectionView thoughts","user":{"login":"satchmorun","id":37308,"url":"https://api.github.com/users/satchmorun","avatar_url":"https://secure.gravatar.com/avatar/05f3bb69ca834e3bf0250eb59a3d2c68?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"05f3bb69ca834e3bf0250eb59a3d2c68"},"created_at":"2011-12-28T23:45:21Z","milestone":null,"labels":[],"state":"open","updated_at":"2011-12-29T02:30:35Z","id":2675978,"closed_at":null,"html_url":"https://github.com/derickbailey/backbone.marionette/issues/3","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"I saw you added a CollectionView, which is kind of interesting, as I just wrote something similar for a yet unreleased project I'm working on.\r\n\r\nThe main difference is that in the one I wrote, the CollectionView tracks its collection's `add`, `remove`, and `reset` events and automatically updates the DOM accordingly. It would be pretty easy to extend your CollectionView to do the same.\r\n\r\nWould you be interested in such a pull request?","number":3,"url":"https://api.github.com/repos/derickbailey/backbone.marionette/issues/3","comments":2,"assignee":null},"comment":{"user":{"login":"satchmorun","id":37308,"url":"https://api.github.com/users/satchmorun","avatar_url":"https://secure.gravatar.com/avatar/05f3bb69ca834e3bf0250eb59a3d2c68?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"05f3bb69ca834e3bf0250eb59a3d2c68"},"created_at":"2011-12-29T02:30:35Z","updated_at":"2011-12-29T02:30:35Z","id":3297520,"body":">One question: where are you putting the code to do the binding? I typically do that in the initialize method of my views, but I don't want to do that with a base view because it would make it more difficult for extended views to create an initialize method.\r\n\r\nAgreed. It turns out the `extend` function Backbone uses will use a property named `constructor` as the constructor of the subclass. So I'm subclassing Backbone.View with a constructor function, and calling Backbone.View's constructor from it. \r\n\r\n","url":"https://api.github.com/repos/derickbailey/backbone.marionette/issues/comments/3297520"},"action":"created"}