I am currently in the initial stages of transitioning my application to the backbone framework.
One of the tasks involves handling data that is fetched as JSON from an ajax call.
{f1:"f1_value", f2:"f2_value", f3:"f3_value"},
{f1:"f1_value", f2:"f2_value", f3:"f3_value"},
{f1:"f1_value", f2:"f2_value", f3:"f3_value"},
This dataset always consists of 3 columns but can vary in the number of rows.
Once processed client-side into HTML, this data is used to populate a dynamic div, which can extend as needed. Each data chunk is intended to represent a single view within the framework.
<div id = "data_hold"></div>
How can I integrate this data into the framework?
var ModelTest,
CollectionTest,
ViewTest;
ModelTest = Backbone.Model.extend({
});
CollectionTest = Backbone.Collection.extend({
model: ModelTest
}
ViewTest = Backbone.View.extend({
});