title: How would an MVC guru handle these Model attribute changes and their Controller consequences?
body: <p>I'm developing a JavaScript application that should render a visualization based on either settings in the URL hash or based on user interaction.</p>
  
  <p><em>(For the moment I'm using Backbone.js for MVC but I think these questions may be considered framework agnostic ...?)</em></p>
  
  <p>Let's say a user is looking at an application state with indicator A and indicator B selected.
  The user changes indicator B to C, what happens?</p>
  
  <p>Well, changing indicator should cause the model to wait for new data to be fetched and manipulated.</p>
  
  <p>... and then, of course, changing an indicator will have many effects on the different views:</p>
  
  <ul>
  <li>The available entities to show will change</li>
  <li>The scales will change</li>
  <li>The indicator label will change, etc, etc. ...</li>
  </ul>
  
  <p>One question at this stage is what to do with all these dependent/computed variables?</p>
  
  <p><strong>Should the model, in this case, now also keep track of the data availability and the scale etc, based on the change of indicator? And should it hence also trigger change events for all these computed attributes?</strong></p>
  
  <p>In any case, "the main visualization controller" must now be notified about an update to the model, but how does it proceed?</p>
  
  <p>In this case, there was an indicator change which should cause icons to be added and subtracted, labels to change etc. etc.</p>
  
  <p>In another scenario, only the year might change. Should the Controller then run another pathway?</p>
  
  <p>And in a third scenario, both year and indicators might change (for example when the initial URL hash is set) ... yet another set of functions to be triggered in chain?</p>
  
  <p><strong>I'm looking for a robust way of handling these different scenarios so that I can keep track of what should happen when. What I'm specifically interested in, is your opinion on what attributes to keep in the model and how to layout the controller functions in order to be able to render small user interaction changes to the model as well as multi-attribute changes.</strong></p>