title: Backbone.js: view states and routes
body: <p>I'm thinking about the optimal way to structure my Backbone application. The problem is that I have various complex states, each made by some views showing while all the others are hidden.</p>
  
  <p>What is the canonical way to handle this in Backbone? Two things that I've thought are either controlling the state by the router (calling views hide / show methods) or making the views listen for route event.</p>
  
  <p>The problem with the first method is that the router must be aware of all the views existing in the application.</p>
  
  <p>The problem with this second solution is that I have to make <em>all</em> the views listen to <em>all</em> the events and hide for any of them but a couple that make them show.</p>
  
  <p>Thanks for pointing me to a lean solution.</p>