title: Models in Backbone.js
body: <p>I have a question about handling my models. I get all confused. When I load the page I get a JSON string from rails containing "events" these events have in turn one user, multiple participants, multiple payments and multiple comments, these comments, have in turn one user, and the payments have multiple users and a single user. The comments and payments also have an event pointing back att the parent.</p>
  
  <pre><code>Events
    User
    Participants(users)
    Payments
      User
      Users
      Event
    Comments
      User
      Event
  </code></pre>
  
  <p>Okey, so the question is: Should I load everything as a tree, with full attributes everywhere:</p>
  
  <pre><code>"events": {
    "id": "event_1",
    "user": {
      "id": "user_1", "name":"name"
    }, "participants": [
      {"id": "user_1", "name":"name"},
      {"id": "user_2", "name":"name"}
    ], "payments": [{
        "id":"payment_1",
        "user": {
          "id": "user_1", "name":"name"
        },"users": [
          {"id": "user_1", "name":"name"},
          {"id": "user_2", "name":"name"}
        ], "event": {root event object}  
      }], "comments": [{
        "id": "comment_1",
        "user": {
          "id": "user_1", "name":"name"
        }, "event": {root event object}  
      }]
    }
  }
  </code></pre>
  
  <p>And then have the events model, to create new comments, payments and users, and assign it to  it's own event, or is it a better idea to load every event, user payment and comment into separate variables, and then use the variable to get the models.
  It is quite hard to explain, so feel free to ask if I need to clarify something.</p>
  
  <p>Conclusion: Should I let the event model handle the creation of all the nested objects, or is there some better way to handle this, and have access to the models more globaly?</p>