first sentence:
"You need a solid knowledge of JavaScript, familiarity with Backbone, Ruby, HAML, SASS and CoffeeScript to find this writeup useful."
Feels like an awful lot of prereqs for a starter. I don't expect to be spoon-fed JavaScript basics, but I feel like too many Backbone guides presume some understanding of Backbone before starting with something that is supposed to help you learn Backbone. Just a minor frustration of mine.
If you're going to study Backbone, it might be better to just study Backbone, using standard HTML/CSS/JS instead of HAML/SASS/Coffee. That would simplify the prereqs a bit and make it a little more accessible. But on the other hand, if you're at the point where you have a practical need to learn Backbone, it's sort of assumed that you're a web developer and should already be familiar with HAML, SASS, and Coffee. So I guess it's a judgement call by the author.
I agree.
That's like saying a web developer should be familiar with Ruby.
Unless you've made a conscious decision to use it, there's no reason to assume that you're familiar with the tools in question.
For what it's worth, I can see myself needing Backbone (or something similar) for what I'm working on, but there's no way I'll be using CoffeeScript.
https://github.com/mihar/backbone-skeleton/
... you'll find a somewhat odd scaffold that doesn't give you much more than a raw Sinatra app with Backbone included on a page -- but will probably feel far more confusing, with the inclusion of arbitrary bits of code:
https://github.com/mihar/backbone-skeleton/blob/master/src/c...
If you look at this as an interesting example of an extraction from an existing app -- that's great; more power to you. But I'd be wary of using it as a "skeleton" to start building your own thing.
That said, if other folks want to share their basic setup or source code, like @dangrossman did, that would be lovely. I'll start: https://github.com/documentcloud/documentcloud/tree/master/p...
I do think, though, that if someone will still be a bit confused how to stitch things together after reading and poking around for a while, this sort of skeleton could provide just enough insight.
I released this as something that seemed useful to me and in that context should be useful to at least someone else.
If you're unfamiliar with the Ruby world, the usefulness somewhat disappears, but that's said in the prerequisites.
Saying what the best "skeleton" is would be like saying that there's a particular skeleton app you should always use when starting a project that involves jQuery.
I started with backbone and was like...wtf is this. Then I went to knockout and it is what I am using now. I used Angular in a pet project a few weeks ago and was totally blown away at how easy it was. Angular is more suited to projects where you use it from the get go. I really like knockout because it is good to integrate in existing projects.
Backbone is in my opinion more a library ( like jQuery ) than a framework. it doesnt force people doing anything , it provides helpers and conveniant "classes" to work with.
But it doesnt solve most of the problems regarding app architecture. AngularJS solves app architecturing problems in a elegant declarative way ( like Flex before it ).
You can see the different styles for yourself for a very basic web application (and try to extrapolate what it would look like for large ones): http://addyosmani.github.com/todomvc/
Unless you use a plugin , you'll have hard time updating your views automatically in Backbone if your model has nested objects. And your models cannot be arrays. In AngularJS it doesnt matter.
The code is available on github [2], the author is clear and concise, and there are a number of back ends supported (node/express, php/slim, java/jersey).
[1] http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tu...
If you don't trust your own architecting abilities very much, it might be worth checking out Derick Bailey's Marionette, which provides a basic architecture on top of Backbone.
Feedback and contributions are welcome: http://phreeze.com/
Then I tried Knockout.js - It has a very nice quickstart. http://learn.knockoutjs.com/ - after a few days playing around with it, I started on my project.
Good resources: Knockout.js Documentation http://www.knockmeout.net/ Stackoverflow
You can find it here: http://addyosmani.github.com/backbone-fundamentals/
For people who prefer learning from screencasts the material from TutsPlus is also good.
Also, throwing HAML, SASS, Coffeescript, autogeneration and more into this makes this just... that much less useful.
Check out this book. It sounds like what you are looking for.