Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ember ATX: Ember.Evented
Search
timgthomas
July 24, 2015
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ember ATX: Ember.Evented
Lightning talk about one of my favorite Ember mixins, Ember.Evented!
timgthomas
July 24, 2015
More Decks by timgthomas
See All by timgthomas
Living Style Guides: Bringing Designers and Developers Together
timgthomas
0
260
Icons and the Web: Symbols of the Modern Age
timgthomas
0
200
Constructing Modern UIs with SVG
timgthomas
0
220
Browser Invasion: Desktop Apps and the Web
timgthomas
0
190
Mind the Gap: Bringing Designers and Developers Together
timgthomas
0
150
Zero to App Store: A Hybrid App’s Tale
timgthomas
1
170
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
170
Ember ATX: Components
timgthomas
0
110
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
410
Other Decks in Technology
See All in Technology
AWS Security Hub CSPMの成功・失敗体験
cmusudakeisuke
0
560
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
170
AI時代に求められる技術力 フロンティア・クリエイティビティ / Technical Excellence in the AI Era: Frontier Creativity
kaonavi
0
110
クレデンシャル流出 ― 攻撃 3 時間 vs 復旧 10 時間。この非対称性にどう備えるか
kazzpapa3
3
570
徹底討論!ECS vs EKS!
daitak
3
1.7k
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
180
AIAU_UMEMOGU_ninomiya_slide
ninomiya_ii
0
260
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
140
40代で“やっとエンジニアになれた”――閉じた学びを開き、空の青さを知る / 20260628 Naoki Takahashi
shift_evolve
PRO
4
890
レガシーな広告配信システムでのAI駆動開発/運用の挑戦
i16fujimoto
0
120
2026-06-24_人とAIの責務分離に基づく開発プロセスの提案.pdf
takahiromatsui
0
190
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
300
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
420
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Paper Plane
katiecoart
PRO
1
52k
Raft: Consensus for Rubyists
vanstee
141
7.6k
A designer walks into a library…
pauljervisheath
211
24k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Faster Mobile Websites
deanohume
310
32k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Transcript
Hi!
@timgthomas
Scenario
// models/item.js export default Ember.Object.extend({ actions: { save() { this.set('savedAt',
new Date()); } } }); // components/show-item.js export default Ember.Component.extend({ itemSaved: function() { // ... }.observes('item.savedAt') });
”Data Down, Actions Up“
Ember.Evented
// models/item.js export default Ember.Object.extend(Ember.Evented, { actions: { save() {
this.trigger('saved'); } } }); // components/show-item.js export default Ember.Component.extend({ init() { this._super(); this.get('item').on('saved', this.itemSaved); } });
// controllers/list.js export default Ember.Controller.extend(Ember.Evented, { actions: { save() {
this.trigger('saved'); } } }); // controllers/item.js export default Ember.Controller.extend({ init() { this._super(); this.get('controllers.list').on('saved', () => {}); } });
Route Hierarchy Gotcha!
let controller = this.get('controllers.foo'); controller.trigger('foo'); controller.trigger('foo', 'bar'); controller.on('foo', () =>
{}); controller.off('foo', () => {}); controller.one('foo', () => {}); controller.has('foo');
bit.ly/ember-evented
Thanks!