News for hackers. Stuff that matters.

Ask HN: How to learn Backbone

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.

Can someone provide me a single resource or multiple great resources to learn Backbone, start to finish (preferably quickly but not mandatory)

( 33 comments | 125 points | on HN )
Re:Ask HN: How to learn Backbone by richardofyork on Sunday August 26, 2012 @10:23AM (#4435145)
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-tu...

http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tu...

— 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...

—— 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.

Re:Ask HN: How to learn Backbone by gee_totes on Sunday August 26, 2012 @04:08AM (#4434627)
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...

Re:Ask HN: How to learn Backbone by davedx on Sunday August 26, 2012 @05:10AM (#4434724)
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.
Re:Ask HN: How to learn Backbone by gee_totes on Sunday August 26, 2012 @09:04PM (#4436913)
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).
Re:Ask HN: How to learn Backbone by robbiet480 on Sunday August 26, 2012 @04:11AM (#4434634)
Yes I have looked at the todo application, but I personally learn better with a tutorial. Thank you for the suggestion and the link, I will read in a few hours
Re:Ask HN: How to learn Backbone by braddunbar on Sunday August 26, 2012 @09:40AM (#4435054)
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.

Re:Ask HN: How to learn Backbone by ya3r on Sunday August 26, 2012 @04:24AM (#4434653)
Re:Ask HN: How to learn Backbone by robbiet480 on Sunday August 26, 2012 @04:25AM (#4434655)
Getting there! This is the most useful link so far! Thanks
Re:Ask HN: How to learn Backbone by datashaman on Sunday August 26, 2012 @05:36AM (#4434752)
Invaluable resource! Long read but so worth it!
Re:Ask HN: How to learn Backbone by ckuijjer on Monday August 27, 2012 @02:20PM (#4440059)
I really like the step by step nature of his post, starting with an ad hoc jQuery implementation and moving gradually to a Backbone implementation while touching on subjects as separation of responsibilities.
Re:Ask HN: How to learn Backbone by jmonegro on Sunday August 26, 2012 @11:37AM (#4435300)
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).

Re:Ask HN: How to learn Backbone by sahat on Sunday August 26, 2012 @02:12PM (#4435727)
Maybe it's just me, but watching Peepcode screencasts puts me to sleep, even at 1.5x speed.
Re:Ask HN: How to learn Backbone by jmonegro on Sunday August 26, 2012 @07:53PM (#4436719)
Hah, that might be due to Geoffrey's voice.
Re:Ask HN: How to learn Backbone by jaseemabid on Monday August 27, 2012 @12:52AM (#4437495)
Its too slow.
Re:Ask HN: How to learn Backbone by theone on Sunday August 26, 2012 @04:16AM (#4434638)
You can start with Addy Osmani's (Backbone fundamentals) http://addyosmani.github.com/backbone-fundamentals/
Re:Ask HN: How to learn Backbone by robbiet480 on Sunday August 26, 2012 @04:17AM (#4434641)
This looks like a great page, bookmarked, will read in a few hours when I get up
Re:Ask HN: How to learn Backbone by mobweb on Sunday August 26, 2012 @08:21AM (#4434946)
Came here to post this. I've actually just started with Backbone a month ago and this was the very best ressource that I found. If you already know a little JavaScript and MVC theory this is perfect.
Re:Ask HN: How to learn Backbone by honzzz on Sunday August 26, 2012 @05:08AM (#4434720)
Maybe have a look at Backbone.js: Hacker’s Guide: http://dailyjs.com/2012/08/16/mvstar-6/
Re:Ask HN: How to learn Backbone by itayadler on Sunday August 26, 2012 @08:09AM (#4434931)
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)
Re:Ask HN: How to learn Backbone by dustincoates on Sunday August 26, 2012 @09:33AM (#4435047)
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.)

Re:Ask HN: How to learn Backbone by rglover on Sunday August 26, 2012 @01:47PM (#4435647)
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.
Re:Ask HN: How to learn Backbone by colevscode on Sunday August 26, 2012 @05:29AM (#4434743)
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...

Re:Ask HN: How to learn Backbone by timc3 on Sunday August 26, 2012 @05:52AM (#4434771)
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.
Re:Ask HN: How to learn Backbone by robbiet480 on Sunday August 26, 2012 @05:54AM (#4434774)
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
Re:Ask HN: How to learn Backbone by some1else on Sunday August 26, 2012 @10:02AM (#4435096)
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.

Re:Ask HN: How to learn Backbone by buremba on Sunday August 26, 2012 @06:16AM (#4434802)
The best way to learn something is to use it.
Re:Ask HN: How to learn Backbone by prydonius on Sunday August 26, 2012 @08:12AM (#4434936)
Yep. I was baffled by backbone tutorials before I actually sat down and decided to get stuck in and try something.
Re:Ask HN: How to learn Backbone by chinchang on Sunday August 26, 2012 @05:25AM (#4434737)
You can get a good resource collection here: http://backbonetraining.net/resources
Re:Ask HN: How to learn Backbone by robin_reala on Sunday August 26, 2012 @08:30AM (#4434962)
Highjacking the conversation, but can anyone recommend good Backbone or modern JS training in London / south-east England?
Re:Ask HN: How to learn Backbone by pdelgallego on Sunday August 26, 2012 @11:40AM (#4435309)
There is an upcoming AngularJS meetup in London

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

Re:Ask HN: How to learn Backbone by eweise on Sunday August 26, 2012 @12:33PM (#4435416)
I found this online book about Backbone and Coffeescript really useful http://www.scriptybooks.com/books/backbone-coffeescript
Re:Ask HN: How to learn Backbone by ojr on Sunday August 26, 2012 @11:51AM (#4435336)
Look at and read the annotated source, every now and again
Re:Ask HN: How to learn Backbone by jimmytucson on Sunday August 26, 2012 @12:39PM (#4435430)
For me, this was the tutorial that finally locked it in: codebyexample.info/2012/03/06/backbone-baby-steps/