title: Can I use URL routes with both backend API and Web front end like Backbone.js?
body: <p>I am completely confused by the notion of the use of URL for routing and just don't understand if there is a conflict between the two concepts as I see them, or what I should do to prepare my development to using them.</p>
  
  <p>The two concepts are URL routing to determine front end rendering (à la backbone.js) and back-end routing as a means to provide an API service. The conflict is if they are on the same domain.</p>
  
  <p>For example let's say I plan Front End routing like this:
  A framework such as backbone.js uses routing in order to determine which actions to perform to render templates to the user. For example a url <code>http://www.mydomain.com/categories</code> is the route to render a list of categories in a template.</p>
  
  <p>Howeever, it needs to get the list of categories from a backend service on the same domain in order to populate the model and handle changes to data. So I plan to be able to POST, UPDATE, DELETE etc...</p>
  
  <p>So this is where I get confused. If I create a API service on <code>http://www.mydomain.com/managecategories</code> how does the front end framework know not to throw an error because I haven't defined that route?</p>
  
  <p>And further what am expected to deal with (in terms of error handling or not) if I was just to update the URL manually and hit enter?</p>
  
  <p>I just can't get my head round this.</p>