

Ask HN: How to learn Backbone - robbiet480

Backbone Tutorials isn't up to date, a simple "Backbone tutorial" search brings up results from 2011, early 2012. I need to learn 0.9.2 Backbone, not an older version.<p>Can someone provide me a single resource or multiple great resources to learn Backbone, start to finish (preferably quickly but not mandatory)
======
richardofyork
I learned Backbone just about 3 months ago and the first project I built
(still in developing) with it was a commercial eCommerce web application for a
major client. This is how I learned Backbone:

—— 1. I downloaded a copy of the following book and followed all the examples:

<http://addyosmani.github.com/backbone-fundamentals/>

Note that the following incomplete sections in the book you will very likely
need (I did). The answer to each can be found on StackOverflow.

\- Sub-Views And Nesting

\- Managing Models In Nested Views

\- Views Triggering Other Views

\- Cleanly Disposing Views

\- [Communicating effectively between views (particularly subviews)]—I added
this because I was not sure how to do this after reading the book, I found
help on StackOverflow.

By the way, the book is very good and Addy Osmani is a thorough writer, he
does not shy away from detail, which I love. Detail is very good, it prevents
you from getting stuck later and allows you to have a thorough understanding
of the subject matter.

—— 2. Follow these 3 tutorials, they are easy, but very helpful:

[http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-
tu...](http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-
part-1-getting-started/)

[http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-
tu...](http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-
part-2-crud/)

[http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-
tu...](http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-
part-3-deep-linking-and-application-states/)

— And this one, which is incredibly important for improving your Backbone
skills and using Backbone efficiently. These are the things the author later
learned on how to improve his preceding 3 tutorials that I listed above:

[http://coenraets.org/blog/2012/01/backbone-js-lessons-
learne...](http://coenraets.org/blog/2012/01/backbone-js-lessons-learned-and-
improved-sample-app/)

—— 3. And StackOverflow will be your God send when you start to develop with
backbone and realize that some simple things like communicating beween
subviews is not immediately apparent. I also got a few excellent tips from
this blog to help me on my way:

<http://ricostacruz.com/backbone-patterns/>

The commercial application I built is almost complete, I will post a link to
it within a few days.

If you follow my guide above, I am confident you would be as equipped as I was
to build a serious Backbone.js application without any experience in Backbone.

All the best with your learning and developing.

------
gee_totes
If the question here is _How to learn Backbone_ , my suggestion would be to
take one of the to-do app examples and just build and hack on that until you
develop the app you want. Try doing it with just built-in backbone
functionality; don't override any of the defaults. Use hacking an already
built-app to get a feel for the limitations of the framework, which in turn
will show you some interesting (for me, at least, coming from MVC world)
design patterns.

If the question here is _Where is a good Backbone tutorial_ , I encourage you
to look at the tutorial on Backbone-Relational (which is a plugin for
Backbone):

[http://antoviaque.org/docs/tutorials/backbone-relational-
tut...](http://antoviaque.org/docs/tutorials/backbone-relational-tutorial/)

~~~
davedx
Yes! Coincidentally I was using that tutorial to learn backbone yesterday
morning. I found it was a great all-round illustration of how everything ties
together. One thing I found quite lacking in other tutorials was how you wire
up your front-end backbone app to backend web services. This tutorial
demonstrates how you do that very well.

~~~
gee_totes
Totally sympathize with that difficulty. If you have access to Safari Books
Online, they have a really good chapter that also goes through the Backbone
wiring-up process in their MongoDB book (which has a chapter about Backbone).

------
braddunbar
Backbone has some of the clearest, most self-explanatory source of any project
I've ever worked on. Also, at around 1500 lines of commented code it's a quick
read that you can take in all at once (and again later). Also, make sure to
read the source in the master branch as well as the annotated docs from the
website to keep you informed on the upcoming changes.

I'm not saying that you shouldn't read tutorials, guides, and docs, but you
should concentrate most of your effort on taking in the source.

------
ya3r
Step by step from jQuery to Backbone

[https://github.com/kjbekkelund/writings/blob/master/publishe...](https://github.com/kjbekkelund/writings/blob/master/published/understanding-
backbone.md/)

~~~
robbiet480
Getting there! This is the most useful link so far! Thanks

------
jmonegro
I can't believe no one has suggested Peepcode.

<https://peepcode.com/products/backbone-js>
<https://peepcode.com/products/backbone-ii>
<https://peepcode.com/products/backbone-iii>

It's not free, but you get way, _way_ more than what you pay for ($9 per
screencast).

~~~
sahat
Maybe it's just me, but watching Peepcode screencasts puts me to sleep, even
at 1.5x speed.

~~~
jmonegro
Hah, that might be due to Geoffrey's voice.

------
theone
You can start with Addy Osmani's (Backbone fundamentals)
<http://addyosmani.github.com/backbone-fundamentals/>

~~~
robbiet480
This looks like a great page, bookmarked, will read in a few hours when I get
up

------
honzzz
Maybe have a look at Backbone.js: Hacker’s Guide:
<http://dailyjs.com/2012/08/16/mvstar-6/>

------
itayadler
Although this isn't a tutorial, but I thought it was worth mentioning.
pragprog.com has released a screencast series on Backbone, by Derek Bailey,
the creator of Backbone.Marionette and various other Backbone extensions. I've
personally watched the series and gained lots of insight on Backbone thanks to
it. (<http://pragprog.com/screencasts/v-dback/hands-on-backbone-js>)

------
dustincoates
It isn't quite start to finish, but I've been enjoying Code School's Anatomy
of Backbone.js: <http://www.codeschool.com/courses/anatomy-of-backbonejs>

(Really, in general, I'd highly recommend Code School. Likely too basic for
most here, but great to pass along to that person you know just starting out
or in the early intermediate stages.)

~~~
rglover
Agreed. I read a lot of tutorials, docs, and other info about Backbone. Code
school was the first to help me "get it." Soon after walking through the first
two chapters, I went and read the infamous annotated todo and everything made
sense. Highly recommended.

------
colevscode
Ton of good resources here: <http://backbonetraining.net/resources>

As for the todo example, I found it a bit convoluted, so I tried to create a
minimal backbone app here:

[https://github.com/backlift/backlift-
templates/tree/master/m...](https://github.com/backlift/backlift-
templates/tree/master/minimal)

------
timc3
Also have a goal in mind. It's probably easier if you want to build X with
backbone rather than learn backbone then try and build something.

~~~
robbiet480
Yeah I have a very specific goal in mind of what to build, friends are telling
me it's perfect for Backbone which is what led me here

------
some1else
Make composed views, paginated collections, filtering forms, and the like.
Although there are now opinionated plugins for these setups, I found that
building them myself helped me develop a sense of how to structure views in
order to avoid complexity and ambiguity.

The Backbone Docs and it's listed examples are really the best resource out
there.

------
buremba
The best way to learn something is to use it.

~~~
prydonius
Yep. I was baffled by backbone tutorials before I actually sat down and
decided to get stuck in and try something.

------
chinchang
You can get a good resource collection here:
<http://backbonetraining.net/resources>

------
robin_reala
Highjacking the conversation, but can anyone recommend good Backbone or modern
JS training in London / south-east England?

~~~
pdelgallego
There is an upcoming AngularJS meetup in London

<http://www.meetup.com/AngularJS-London/events/78531572/>

------
eweise
I found this online book about Backbone and Coffeescript really useful
<http://www.scriptybooks.com/books/backbone-coffeescript>

------
ojr
Look at and read the annotated source, every now and again

------
jimmytucson
For me, this was the tutorial that finally locked it in:
codebyexample.info/2012/03/06/backbone-baby-steps/

