Part 1: Getting started with building a Backbone.js App
Single-Page Applications, sometimes referred to as SPA, are web apps that appear to have multiple pages but in reality are routed through the same index.html file. This is similar to Drupal where each page request is routed through index.php. In this tutorial we will utilize the Backbone.js library to build a Single-Page Application with one index.html file that has multiple routes.
To get started building your first Backbone.js App according to the video tutorial, you’ll need to install the Backbone.js App Generator for Yeoman.
- Install Node.js https://nodejs.org/ (click install for an easy installer)
- Install Yeoman with other required command line tools by running the following command in your terminal `npm install -g yo bower grunt-cli gulp`
- Install the Backbone.js Generator for Yeoman by running the following command on your command line `npm install -g generator-backbone`
Here’s a todo list for our goal of building a Single-Page Application that uses Backbone.js.
- Scaffold a Backbone.js App using the Yo Backbone generator
- Explore the Backbone.js App “bootstrap” process
- Set up Regions in the DOM for Content
- Create a Backbone Router with Routes for multiple pages
- Use Grunt to build the code for release on production