Hacker News new | comments | show | ask | jobs | submit login
Ask HN: How to learn Backbone
125 points by robbiet480 1707 days ago | hide | past | web | 33 comments | favorite
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)




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


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.


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


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


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.



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


Invaluable resource! Long read but so worth it!


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.


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


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


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


Its too slow.


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


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


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.


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


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.


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)


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


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.


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.


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


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


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.


The best way to learn something is to use it.


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


You can get a good resource collection here: http://backbonetraining.net/resources


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


There is an upcoming AngularJS meetup in London

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


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


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


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




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: