title: Composite or Sideloading?
body: <p>I am relatively new to building APIs and have come across the following two terms a few times now and am a bit confused. I'm hoping someone can put me straight with some definitions that I cannot even find on wikipedia. Im not sure if they can be reliably used interchangeably without upsetting people or whether it depends on who you talk to.</p>
  
  <p><strong>Sideloading</strong>   </p>
  
  <ul>
  <li><p>the ability to optionally include other related resource(s) in a response<br>
  eg. <code>/accounts?include=transactions</code> will include <code>transactions</code> resources in my <code>/accounts</code> resources response ?</p></li>
  <li><p>this really means that we avoid duplication of resources in a response by moving them out into their own section of the message, eg.instead of</p>
  
  <p><code>{ "orders": [ { 
        "id": "101", 
          "product": { "id": "2000", "desc": "blah", "price": "100.0" }
        "id": "102", 
          "product": { "id": "2000", "desc": "blah", "price": "100.0" }</code>    </p>
  
  <p>we would have:</p>
  
  <p><code>{  "orders": [ { 
        "id": "101", 
          "product": { "id": "2000" }
        "id": "102", 
          "product": { "id": "2000" } 
       ],
      "products": [
          { "id": "2000", "desc": "blah", "price": "100.0" }
  </code></p></li>
  </ul>
  
  <p><strong>Composite Document</strong></p>
  
  <ul>
  <li>Simply means you have a mix of related resources (that can also stand alone) in a resources response eg. <code>accounts</code> and <code>transactions</code> resources can be requested on their own or also combined in the same <em>composite</em> document ??</li>
  </ul>