Mr Router Embraces the Controller
summary
Argues that controller-centric query params are preferable to a router-only API, shows a concrete implementation: a global cache injected into controllers that creates model-dependent buckets keyed by route plus model id, and a demo that preserves per-item selection and scroll position across navigations. Uses Ember canary and a prototype mixin/component; it is promising and workable but still vaporware, requiring a missing primitive for configurable stickiness before query params move to beta.
AI-written summary · about
chapters (4)
- 0:00Start
- 8:31What is the job of a controller anyway? • Manage application state • Wrap the model with additional information to present to the template (also application state)
- 14:58Controller Property Stickiness • No One Right Answer only some wrong ones • Welcome to the Dismal Science of API Design • Goal: find the missing primitive, expose it as something that can be configured when necessary. but offer a high-level convention so that configuration is rare
- 18:48How is it implemented? • Inject a cache object onto all controllers • Each sticky property is responsible for computing a bucket key • Replace sticky properties with bindings into the cache object, keyed by bucket key
related talks
38mRouting in Polaris
35mEmber on Rails - Convention over Configuration on both sides of the tubes
42mQ&A with Ed Faulkner
24mNew to Ember: What ARE All These Things?
29mIdiomatic Ember, Sweet Spot of Performance and Productivity
29mDebugging Ember With Empathy
21mHow I Learned to Love Ember
26mModern Javascript Frameworks - Introduction to Ember.JS and Ember-CLI
