Can I have a view without a model?
I just want to render some data with the backbone view that I'm familiar with. The data doesn't map to a REST url or some model.
Can I do that or should I just make a model anyway?
Can I have a view without a model?
I just want to render some data with the backbone view that I'm familiar with. The data doesn't map to a REST url or some model.
Can I do that or should I just make a model anyway?
Share Improve this question asked Jan 25, 2012 at 3:04 HarryHarry 55k76 gold badges185 silver badges270 bronze badges2 Answers
Reset to default 9You don't always need a model.
Models and views don't have to be 1:1. In fact, they probably rarely are in practice. Some views might render data for several different models. Others might not, and instead might listen for DOM events, or render data from a third-party source, or any number of other things that don't require a model.
Models and Views are not tied together. There are no dependencies between the other.
You don't have to have a model to make a view.
You can just make Backbone render your data using the backbone's view.