Helpful Backbone Explanation

Backbone.js is basically an uber-light framework that allows you to structure your Javascript code in anMVC(Model, View, Controller) fashion where…

Model is part of your code that retrieves and populates the data,

View is the HTML representation of this model(views change as models change, etc)

and Controller that in this case allows you to save the state of your javascript application via a hashbang url, for example:

Some pros that I discovered with Backbone:

  • No more Javascript Spaghetti: code is organized and broken down into semantically meaningful .js files which are later combined using JAMMIT
  • No more, bla): no need to store data in DOM, store data in models instead
  • event binding just works
  • extremely useful underscore utility library
  • backbone.js code is well documented and a great read. opened my eyes to a number of JS code techniques.


  • Took me a while to wrap my head around it and figure out how to apply it to my code, but im a Javascript Newb.

Here is a set of great tutorials on using Backbone with Rails as the back-end:

CloudEdit: A Backbone.js Tutorial with Rails:

p.s. There is also this wonderfull Collection class that lets you deal with collections of models and mimic nested models, but i dont want to confuse you from the start.

what are your thoughts?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s