title: Backbone.js - Dynamic routing for a large site
body: <p>I am planning to use backbone + require for an application which has more than 30 modules. Instead of creating separate route for each module, I am planning to create something like this.</p>
  
  <p>Not sure it this is a best practice. Please guide.</p>
  
  <pre><code>routes: {
    ":module"                   : "routeLevelOne",
    ":module/:id"               : "routeLevelTwo",
  },
  
  routeLevelOne: function(module){
      require(['views/' + module + 'View',],
          function(){
            require('views/' + module + 'View').render();  
         }
      );
  },
  
  routeLevelTwo: function(module, id){
      require(['views/' + module + 'View',],
          function(){
            require('views/' + module + 'View').renderWithId(id);  
         }
      );
  },
  </code></pre>