Scaling Backbone.js
summary
SoundCloud migrates its site to a Backbone single-page app (December 2012) with 30 million users, about 37,000 lines of code (80% JS), and a model surface of 33 models 48 collections 200 views. Stack includes Backbone, jQuery, Underscore, Handlebars, SoundManager2, RequireJS/Almond and Node for builds. Problems: boilerplate and brittle public API. Solutions: a strict base view class and modular views, swap to canvas-based comment rendering to collapse thousands of DOM nodes, create specific backend services and compressed waveform JSON to cut requests and parsing.
AI-written summary · about
chapters (9)
- 0:00Introduction to tech stack
- 1:35Engineering pains & tools
- 6:35Managing view boilerplate
- 11:51Building modular views
- 17:25API strategy at scale
- 28:58Optimizing DOM performance
- 32:53Canvas for rendering
- 37:13UI illusions for speed
- 41:34Conclusions & Q&A
related talks
54mTaking JavaScript Seriously with Backbone.js
41mBackbone: 3 Ways
33mPitfalls and Opportunities of Single Page Applications
28mBuilding in Rails, Backbone, and CoffeeScript
30mBringing it all together
40mUsing Backbone.js with Rails: Patterns from the Wild
20mBuilding Platforms with Angular
40mClient Side MVC and The Gosh Darn Back Button
