Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
110
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
230
Icons and the Web: Symbols of the Modern Age
timgthomas
0
160
Constructing Modern UIs with SVG
timgthomas
0
190
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
85
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
380
Other Decks in Technology
See All in Technology
Microsoft Agent 365 を 30 分でなんとなく理解する
skmkzyk
1
1k
Karate+Database RiderによるAPI自動テスト導入工数をCline+GitLab MCPを使って2割削減を目指す! / 20251206 Kazuki Takahashi
shift_evolve
PRO
1
460
Snowflakeでデータ基盤を もう一度作り直すなら / rebuilding-data-platform-with-snowflake
pei0804
2
330
コミューンのデータ分析AIエージェント「Community Sage」の紹介
fufufukakaka
0
430
AI時代におけるアジャイル開発について
polyscape_inc
0
130
AIと二人三脚で育てた、個人開発アプリグロース術
zozotech
PRO
0
680
AI時代の開発フローとともに気を付けたいこと
kkamegawa
0
2.1k
エンジニアとPMのドメイン知識の溝をなくす、 AIネイティブな開発プロセス
applism118
4
720
Debugging Edge AI on Zephyr and Lessons Learned
iotengineer22
0
110
21st ACRi Webinar - Univ of Tokyo Presentation Slide (Shinya Takamaeda)
nao_sumikawa
0
120
生成AI・AIエージェント時代、データサイエンティストは何をする人なのか?そして、今学生であるあなたは何を学ぶべきか?
kuri8ive
2
2.1k
グレートファイアウォールを自宅に建てよう
ctes091x
0
140
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
The Language of Interfaces
destraynor
162
25k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Code Reviewing Like a Champion
maltzj
527
40k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.7k
It's Worth the Effort
3n
187
29k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
What's in a price? How to price your products and services
michaelherold
246
12k
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!