puppeteer/puppeteer — pull request #18 by edygar (2014-03-21 00:03:47+00:00)
Title: Remodeling to add the buffer collection

Altough the mixin was a good idea to store data outsite the collection during the filter, I think the model layer is overloading its duty. Following the sample given by `Backbone.Collection`, `filter` doesn't affect the data of the collection, it returns the subset of it in an array. Why? I think the collection shouldn't be doing anything other than it was required to. Besides find the models that fits in the filter, the previous implementation of `filterByName` was overwriting previous data.

I think this as very dangerous. As a entity, we never know by whom or how many parts of the code will be listening to its changes, and how it will be afected. Filter is not meant to be a data change, it is a visualization change. But visualization layer is not meant to decides which models must be presented, its duty is present received data.

I think this is a controller duty. The controller is the responsible to give a flow to the app, consequently manage its state. So, the controller now keeps an accurate collection of what should be presented to the user based on the filter and the collection repository data.