| 1. |
Explain How You Can Use Backbone.js For Multiple Page Web App? |
|
Answer» 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://wisdomjobs.com/* will serve /var/www/wisdomjobs.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. 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://wisdomjobs.com/* will serve /var/www/wisdomjobs.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. |
|