Backbone Boilerplates

screenshot of Backbone Boilerplates

Backbone Boilerplates

Backbone.js stack boilerplates demonstrating integration with Express, Ruby, PHP, Grails and more.

Overview

The Backbone Boilerplates repository is a collection of integration examples that demonstrates how to integrate Backbone.js with different backend technology stacks. The repository currently includes examples for Node.js and Express with MongoDB and Mongoose, Ruby and Sinatra with MongoDB, Grails with MongoDB, PHP with Slim PHP RESTful framework and MySQL, Rails with Rails Asset Pipeline and CoffeeScript, and Vert.x with MongoDB. The examples utilize the HTML5 Boilerplate as a base and require MongoDB to be installed and running.

Features

  • Integrate Backbone.js with various backend technology stacks
  • Examples provided for Node.js, Ruby, Grails, PHP, and Vert.x
  • Utilizes MongoDB as the backend database
  • Includes pre-configured setup for Node.js with Express and Mongoose
  • Supports both HTML and Jade layout options for Node.js examples
  • Supports Haml layout for Ruby examples
  • Easy setup and installation process

Installation

  1. Ensure that MongoDB is installed and running.
  2. Download the MongoDB package and extract it.
  3. Create a new data directory by navigating to the bin/data/db folder and running the following command in the terminal:
mkdir -p /path/to/mongodb/bin/data/db
  1. Start the MongoDB server by opening two terminal windows. In the first window, navigate to the MongoDB bin directory and run the following command:
./mongod
  1. In the second window, start the MongoDB shell with the following command:
mongo
  1. Proceed with the installation process for the desired option:
    • Option 1 or Option 2 (Node.js with Express and Mongoose):
      • Ensure that Node.js is installed.
      • Open a terminal and run the following commands:
      cd /path/to/boilerplate/option1
      npm install
      node app.js
      
      • Access the application at http://localhost:3000/static.html (Option 1) or http://localhost:3000/todo (Option 2).
    • Option 3 (Ruby with Sinatra and Haml):
      • Ensure that Ruby and bundler are installed.
      • Open a terminal and run the following commands:
      cd /path/to/boilerplate/option3
      bundle install
      ruby app.rb
      
      • Access the application at http://localhost:4567/todo.
    • Option 4 (Grails with MongoDB):
      • Follow the specific setup instructions provided in the repository.
    • Option 5 (PHP with Slim PHP RESTful framework and MySQL):
      • Follow the specific setup instructions provided in the repository.
    • Option 6 (Rails with Rails Asset Pipeline and CoffeeScript):
      • Follow the specific setup instructions provided in the repository.
    • Option 7 (Vert.x with MongoDB):
      • Follow the specific setup instructions provided in the repository.

Summary

The Backbone Boilerplates repository provides developers with integration examples of Backbone.js with various backend technology stacks. The examples cover Node.js, Ruby, Grails, PHP, and Vert.x, offering different options for developers depending on their preferred technology stack. The installation process is straightforward, and each example comes with pre-configured setup to quickly get started. With the use of MongoDB as the backend database, developers can easily explore and learn how to integrate Backbone.js in their applications.