Resources for getting started with Backbone.js

The current product I am building makes heavy use of HTML5 & javascript to give the user a rich experience, both on and offline, across a variety of screens. Before I even started this application I knew I wanted a clean and proven approach to help manage the complexity on the client. After reviewing several js frameworks I decided to go with backbone.js (compare yourself). I have been working with backbone for several months and I am really happy with it, and would recommend to anyone building similar types of javascript applications.

As per the project description:

Backbone supplies structure to JavaScript-heavy applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.”

There are a ton of good ‘getting started’ posts out there, so rather than duplicate those I thought I would put together a few of my favorite resources. Hopefully some of you might find them useful.

  • Backbone.js : The main github site- Here you will find valuable reference documentation as well a simple examples to introduce you to backbone. Be prepared to spend a little time here 😉
  • Underscore.js : “It’s the tie to go along with jQuery‘s tux, and Backbone.js‘s suspenders.”  If you haven’t heard about underscore do yourself a favor on go check it out. There is nothing magical about it, yet I can’t say enough. Even if you aren’t using backbone, I highly recommend this library (some folks are using it on the server with node.js as well).
  • Todo.js : A simple Todo list example using backbone.js
  • TodoMVC : Compare a truck load of JS MVC frameworks – “a project which offers the same Todo application implemented using MVC concepts in most of the popular JavaScript MVC frameworks of today.”
  • Backbone.js Fundamentals : A book on Backbone.js targeted at beginners and advanced users alike – by Addy Osmani (and contributors). This guide is quickly becoming the ‘mini-bible’ for backbone. Chalked full of nuggets, from beginning concepts to the more advanced.
  • The Backbone Boilerplate : “Backbone Boilerplate is a set of best practices and utilities for building Backbone.js applications”
  • Organizing Your Backbone.js Application With Modules : Some guidance around how you might structure your application using modules (esp valuable for larger applications).
  • Organizing your application using Modules (require.js) : Similar to the previous article, but makes use of AMD & Require.js to wire up the application.
  • Derick Baileys blog on Lostechies : Derick has been blogging on backbone for 6 mos or so. I appreciate reading Dericks blog because he has done such a good job of cataloging his experiences as he has learned the framework. When I found myself stumbling with backbone, my searches often led over to Dericks blog.
  • Backbone.js Screencast – Introduction and Views : A nice “basic introduction on how to bootstrap a new Backbone.js application and go in-depth on how to use Backbone Views in particular”. Joey now also has screencasts available over at his site http://backbonescreencasts.com/
  • Backbone.js walkthrough of Models and Views (Part 1/2) Screencast : Enough said!
  • Using node.js + backbone.js + socket.io for real-time goodness : I haven’t actually implemented this yet, but am excited about the possibilities. Check out here here and here for some examples. (seeing how the middle tier in this app is MVC.net, I may opt to swap socket.io for signalR. Hoping to take the node.js plunge at some point).

Updated:

That’s all for now. Please feel free to reach out with any other resources you found helpful and Ill add them on here. I am still very much learning and would love to read your posts. More to come-

5 thoughts on “Resources for getting started with Backbone.js”

  1. depending on how complex your app would be, I recommend you take a look at Sencha ExtJS also. I’ve used it in a cluster management app, and although I don’t use their mvc approach, the UI I generate from it is great.

    I’m happy with it, but I don’t think Backbone has the ability to give me the same control on business apps.

    1. I took a quick look at ExtJS about 8 mos ago after hearing really good things (worked on a small protoype using Sencha Touch). jQuery is a big deal for me however, so I moved along (and such have chosen jquerymobile also instead of Sencha Touch). Curious why you don’t think Backbone has the ability to give you the same control on business apps? Anything specific?

      1. I think the difference is framework vs library. 

        ExtJS and similar products are very framework-y… that is, they give you a set path to follow. You write code that the framework calls into, and the framework expects your code to look a certain way.Backbone on the other hand, is a library approach. It gives you a set of tools that you can call in to, to get things done. It doesn’t guide your hand in how you structure your code beyond the constructs that it provides. Therefore, you end up with more boilerplate code to provide the over-all app structure that something like ExtJS would provide for you.

        Neither of these approaches is right or wrong. They are simply different approaches.

        I prefer the library approach, personally. I like to inject my own opinions into the way things work, because my opinion changes continuously. At the same time, I’m compiling my own preferences for using the Backbone library as a suite of plugins and add-ons, so that I can avoid a lot of the boilerplate that I almost always use.

Comments are closed.