Newbie backbone question:
Context: Building a shopping list with backbone
I have a model class called with name, description and tags (array) properties. I would
@machineghost is right on; The models are totally decoupled from the views so you can make as many views attached to the same model as you please. You could also extend a view, if they have logic or attributes you would like to share. When I use Backbone I often find myself extending a parent view just to override the render
function, or to provide a different template.
ShoppingCartView = Backbone.View.extend({
model: ShoppingCart
...
});
CheckoutView = Backbone.View.extend({
model: ShoppingCart
...
});
CheckoutView = ShoppingCartView.extend({
template: a_different_template // syntax depends on your templating framework
...
});