title: Where should faux-persisted state live in your ember.js web app?
body: <p>I was reading the excellent <a href="http://twbrandt.github.com/" rel="nofollow">Getting started with ember.js</a> post by <a href="https://twitter.com/twbrandt" rel="nofollow">@twbrandt</a> recently and found his explanation of what your controller/view/model/router/template "should be responsible for" interesting.</p>
  
  <p>When you have a database backed model all is well, put the persisted state in the model object and any state that isn't persisted will more than likely be found in the controller.</p>
  
  <p>But imagine you allow your customers to define what a given model looks like (a configuration of sorts). From this configuration you need to scaffold out a "structure" to add these models at runtime.</p>
  
  <p>For example, you allow your customers to define how many hours their business is open for each day. From this configuration you need to add an empty or "faux" model on the page to fill the entire day. You create these faux models because for each business day you also need to fetch the persisted versions of these (as the customer can actually create one using the app). </p>
  
  <p>So using the config I'm left with a model (that actually gets saved to the database / etc) but I have a need to mix this w/ a model that doesn't really exist but in the handlebars template it really helps to have a shim 'd version of this so the html isn't complex (keeping the logic in javascript).</p>
  
  <p>Currently I'm storing this logic on the model itself because of the "mix" between actual models that are persisted and the faux models / placeholders that get bound to the handlebars template as a single array (yet only some of them are usually persistence backed models).</p>
  
  <p>My question is this -should this array be part of the controller as "some of it" isn't backed? Or should the entire array be an override of the ember-data's "find" method (as I'm doing it now) to enable the "replace each faux with a real model when it exists" behavior?</p>
  
  <p>Thank you in advance</p>