Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Every time I start reading Backbone documentation, my head hurts. This article is even worse.

What they need is a simple, to the point, complete examples of apps. There's one that I found that makes some sense to me:

http://documentcloud.github.com/backbone/docs/todos.html



When starting out with backbone.js I also had a difficult time just using the documentation. Backbone is kind of the opposite of other popular MVC frameworks in that its un-opinionated, it doesn't enforce any strict organization which gives more flexibility but also makes it more difficult to learn.

What worked the best (however not optimal) for me was to combine the techniques used in the PeepCode(https://peepcode.com/products/backbone-js) screencasts and Thoughbot's book (https://workshops.thoughtbot.com/backbone-js-on-rails). Once you start getting in the groove of things the documentation is actually really good for quick look ups and you'll start to see that the framework is actually surprisingly tiny.

I also have a couple sample apps up on github that I used to learn backbone if you'd like to see some more examples: https://github.com/jwarzech/inspire_board https://github.com/jwarzech/realtime_hn


I'm a big fan of Derick Bailey's stuff.

He has a framework on top of Backbone called Marionette that is well documented and makes handling large apps much easier: https://github.com/derickbailey/backbone.marionette

He then builds an email client app with it: https://github.com/derickbailey/bbclonemail

And has a ton of great articles on backbone: http://lostechies.com/derickbailey/category/backbone/

Definitely worth following his work.


My advice: take backbone's code and read it a couple times as you'd read a science book. Get to understand every function and how it ties into the rest of the framework. Most writers read a lot more than they write. Programmers could learn from that.


This is in the top 5 list of why I dig Backbone. The code is concise, clear, and eminently readable.


The Todos example is handy, but not every app is a todos app, and there's plenty of Backbone functionality that is not exercised in this simple app.

And when there isn't an existing example of what I'm trying to do close at hand, I find the Backbone docs to be quite good.


This article is not meant to be a Backbone introduction. I was just exposing some solutions for some problems that we had on building big Backbone apps. The best way to learn Backbone IMO is to start hacking something easy while reading the source.


I think it's because of its in-house past.

Backbone expects you to have your architecture already in mind, and your use case to be more or less similar to DocumentCloud's. Then it will really shine.

The problem is that docs don't really define the whole picture. So you need to figure out stuff yourself, and may unexpectedly find yourself ‘fighting the framework’.

I personally think this is a problem. Backbone really should be re-positioned and turned into a full-blown client-side framework, with more control flow inversion; so that a developer would be able to just create ‘a Backbone project’, customize a few things and be ready to roll.


Interesting.

I'd tend to think that it's because Backbone is agnostic about your backend, and agnostic about your UI. That tends to leave a lot of the big pieces up to you...

That said, I like your premise. If you have more concrete thoughts about what "re-positioned and turned into a full-blown client-side framework, with more control flow inversion' ... would mean in practice, please open a ticket and describe your ideas for discussion.


Here's a complete app built on Backbone.js: http://weblog.bocoup.com/startup-data-trends/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: