I\'m trying to keep track of the state in this app using Backbone.js:
I ha
2) How can I avoid my views setting an attribute on the model which they themselves listen for?
You don't. Your model should be doing validation on any attributes you try to update so your view needs to listen in case your setting of the attribute failed or the validation changed the value.
What your view does is, it's tries to set a value on the model, the model then either sets it, changes the data and sets it, or rejects it. Your view needs to be updated accordingly.
3) How can I push a new state based on a part of the model?
// for each attribute
_.each(["attribute1", "attribute2", "attribute3", ...], _.bind(function(val) {
// bind the change
// bind the setState with `this` and the `value` as the first parameter
this.bind("change:" + value, _.bind(this.setState, this, value));
}, this));