Using Backbone.js with Rails: Patterns from the Wild
summary
Backbone.js pairs with Rails by providing model mirroring (models/collections that sync via REST), DOM-owning views that render templates, and optional routers; two concrete patterns emerge: a full client-side Greenfield full-Monty where Rails becomes a JSON API and Backbone renders everything (works but requires a lot of boilerplate and testing), and an incremental backbone as frosting approach that overlays views onto server-rendered pages using publish/subscribe or routers to swap content — effective for incremental migration. Consider Ember or Meteor if boilerplate is a blocker.
AI-written summary · about
chapters (9)
- 0:00Introduction and context
- 2:46Understanding Backbone
- 4:20Evolution of JS in Rails
- 7:28The page object pattern
- 11:03When to use a framework
- 14:55Backbone core concepts
- 18:59Full-stack Backbone pattern
- 33:28Evaluating Backbone
- 35:17Incremental adoption
related talks
29mBackbone.js, Jasmine and Rails: The Lust Story
29mBackbone.js, Jasmine and Rails: The Lust Story
35mCrossing the Bridge: Connecting Rails and Your Front-End Framework
28mBuilding in Rails, Backbone, and CoffeeScript
54mTaking JavaScript Seriously with Backbone.js
36mRails Vs. The Client Side
34mYour Front End Framework is Overkill - Server Side Javascript w/ Rails
41mBackbone: 3 Ways
