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
0
120
Ember ATX: Ember.Evented
Lightning talk about one of my favorite Ember mixins, Ember.Evented!
timgthomas
July 24, 2015
Tweet
Share
More Decks by timgthomas
See All by timgthomas
Living Style Guides: Bringing Designers and Developers Together
timgthomas
0
240
Icons and the Web: Symbols of the Modern Age
timgthomas
0
180
Constructing Modern UIs with SVG
timgthomas
0
200
Browser Invasion: Desktop Apps and the Web
timgthomas
0
160
Mind the Gap: Bringing Designers and Developers Together
timgthomas
0
130
Zero to App Store: A Hybrid App’s Tale
timgthomas
1
150
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
130
Ember ATX: Components
timgthomas
0
87
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
390
Other Decks in Technology
See All in Technology
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
240
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
370
Cosmos World Foundation Model Platform for Physical AI
takmin
0
920
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
150
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
120
SRE Enabling戦記 - 急成長する組織にSREを浸透させる戦いの歴史
markie1009
0
120
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.5k
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.7k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.9k
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.8k
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
130
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Practical Orchestrator
shlominoach
191
11k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
76
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Google's AI Overviews - The New Search
badams
0
910
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The SEO Collaboration Effect
kristinabergwall1
0
350
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!