BACKBONE.JS Questions and Answers

Explain how you can use backbone.js for multiple page web app ?

For multiple page web app in backbone.js there are lots of consideration but here are two which can be useful

  • Serving the page : In this, where you want to have your web server route everything to the server route everything to serve the same static page. That means that everything in http://interviewquestionspdfs.com/* will serve /var/www/interviewquestionspdfs.com/index.html. once the static page is loaded, the JS on that page will decide what to do given the url
  • Push State : You can still use backbone routing to do your routing, but don’t use hashbangs.  This will allow you to navigate to URLs without actually needing a page refresh.