title: What are the arguments for using a route generator in javascript?
body: <p>I inherited a code base that uses FOSJsRouting bundle to provide route generation in javascript, but I'm having a hard time understanding what benefit that offers.</p>
  
  <p>Assuming that you have a route:</p>
  
  <pre><code>/**
  * @Route("/some/resource/{param}/{otherParam}", name="some_symfony_route_name", options={"expose"=true})
  */
  </code></pre>
  
  <p>Why would you want to build URIs using route names:</p>
  
  <pre><code>$.post(Routing.generate('some_symfony_route_name',{param: 1, otherParam: 2}) /*...*/ )
  </code></pre>
  
  <p>rather than using the established API endpoints?</p>
  
  <pre><code>$.post('/some/resource/1/2' /*...*/ )
  </code></pre>