Hello Backbone.js

Hello Backbone is a simple Backbone.js tutorial comprised of self-explanatory "hello world" examples of increasing complexity. It was designed to provide a smoother transition from zero to the popular Todos example.

Backbone.js offers a lean MVC framework for organizing your Javascript application. It leads to more maintainable code by untangling the "spaghetti" of callbacks tied to different parts of the DOM and the backend server that often arises in rich client-side applications.

The tutorial starts with a minimalist View object, and progressively introduces event binding/handling, Models, and Collections.

Click here to start the JavaScript tutorial.

Click here to start the CoffeeScript tutorial.

Once in the tutorial, use the navigation menu in the top-right corner to view other examples. Example numbers are in order of increasing complexity.

 

Contributions:

CoffeeScript section by Jason Giedymin [ jasongiedymin.com | @jasongiedymin ]

 

Original Author:

Copyright © Artur Adib [ arturadib.com | @arturadib ]

The only non-Javascript part of the examples is the following HTML template:

  <!DOCTYPE html>
  <html>
  <head>
    <meta charset="utf-8">
    <title>hello-backbonejs</title>
  </head>
  <body>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    <script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
    <script src="http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.6/underscore-min.js"></script>
    <script src="http://ajax.cdnjs.com/ajax/libs/backbone.js/0.3.3/backbone-min.js"></script>

    <script src="...number.js..." type="text/javascript"></script>
  </body>
  </html>
            
Fork me on GitHub