Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I realize you're probably doing this as an exercise to get into Backbone, which is not a bad thing, but I do feel you need some tips.</p> <ol> <li>typically collections <em>do not</em> have anything to do with the DOM. The <code>parse</code> method is there in case the default method of parsing, flattening, and/or zeroing in on your data you want to model.</li> <li>To handle the manipulation and the event delegation related the DOM, you'd use Backbone View (literally a new instance created from a Backbone.View extension, but I think you already get that idea). </li> </ol> <p>In your case, things are likely tricky because you're likely dealing with hierarchical (mult-level) JSON data, which Backbone doesn't deal with out of the box. (Nor, arguably, does it need to, although it might be nice if some conventions were developed to deal with such things.**) <a href="https://stackoverflow.com/questions/6150378/backbone-with-a-tree-view-widget">This question</a> deals with that some. I think Derick Bailey (who answered that question) actually may have written a Backbone module to deal with such things, but I haven't investigated it (any of his solutions or that problem in particular) myself. <a href="http://lostechies.com/derickbailey/2012/04/05/composite-views-tree-structures-tables-and-more/" rel="nofollow noreferrer">This</a> may be reference to one particular solution.</p> <p>** That isn't to say that there isn't any conventions already out there, I just don't personally know of any.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload