Ask HN: Why all Backbone resources seem to be outdated?
Hello. I'm self-studying to become a "full stack" web developer and I've chosen Backbone as the first frontend framework/library to learn, since it's small, widely used and plays well with React and other libraries/frameworks.
However, I've found that most resources seem to be pretty outdated and it's been hard to find any tutorial or course not using RequireJS or at least the "newest" Backbone features.
Can you recommend a good, updated path to learn Backbone, best if paired with React as the view layer?
Should I stick with learning Backbone or should I move to another library/framework?
Is Backbone still in high demand, will it still be between now and the next year?
Thank you for your answers and opinions.
12 comments
[ 3.5 ms ] story [ 42.8 ms ] thread1. MVC/MVVM structuring
2. a DOM abstraction, which albeit requiring a lot of learning, works once you grok how to use it (something that can only unfortunately come with experience)
3. Touch driven gestures
4. History and repetitive task management
5. A grid view that's unparalleled in the market.
And that's just for starters. It's downsides include a steep learning curve and a classical inheritance model, but those should hardly be blockers to anyone willing to invest the time it demands.
There is a trend towards more complete frameworks, but Backbone is still in use by many high-profile companies. Learning how it works is a small investment of time, and should give you nice insights for understanding larger & more complex projects.
Marionette (http://marionettejs.com/) will maybe help you see its shortcomings (since it fills those gaps, although I don't personally use it).
Some pro tips:
* Figure out how sync works (when save() calls POST vs. PUT).
* Figure out how this.el works
* Learn the difference between router.navigate('/fun') and router.navigate('/fun', { trigger: true }).
* Learn the difference between url() and urlRoot(), and step through the backbone code with the chrome debugger as it determines a model's URL.
* Look at what delegateEvents() does.
* Learn about .listenTo() and how .remove() can alleviate view zombies.
About Marionette, I started searching for resources and most current blog posts seem to be about moving from Marionette to React so I'm not sure if I'm learning it.
I found it to be a good framework for small apps (not those single page JS application).
While I was learning Backbone I didn't find any really good tutorial, but eventually I figure out an usage and style which suits me.
At times I do wish Backbone would be a "complete and opinionated framework", but I figured out a way to use it to build small UI components. I didn't use the Router components, but combination of model and view does wonder.