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
270
Icons and the Web: Symbols of the Modern Age
timgthomas
0
200
Constructing Modern UIs with SVG
timgthomas
0
230
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
180
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
誤解だらけの開発生産性 / Myths and Misconceptions about Developer Productivity
i35_267
2
830
“それは自分の仕事じゃない"を越えて行け
yuukiyo
1
490
SRE Next 2026 何でも屋からの脱却
bto
0
1k
そのドキュメント、自動化しませんか?
yuksew
1
320
Amplify Gen2でbackend.tsにCDKを定義する/しない事によるCDKの挙動の違いとユースケース
smt7174
1
430
LLM/Agent評価:トップ営業の発言を「正解」にする 〜暗黙的正解による評価を営業資産に変える〜
takkuhiro
1
230
ファミコンでPHPを動かす / PHP on the Famicom
tomzoh
2
480
DMM.com 購入改善推進チーム におけるCodeRabbitを用いた レビューフロー改善の一例
ysknsid25
2
670
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
430
AI時代のYAGNI:「爆速で無駄になった機能」からの学び / 20260720 Naoki Takahashi
shift_evolve
PRO
3
380
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
430
Type-safe IaC for Dart
coborinai
0
160
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The Pragmatic Product Professional
lauravandoore
37
7.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Code Reviewing Like a Champion
maltzj
528
40k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Navigating Team Friction
lara
192
16k
Speed Design
sergeychernyshev
33
1.9k
Chasing Engaging Ingredients in Design
codingconduct
0
240
The Curse of the Amulet
leimatthew05
2
13k
Typedesign – Prime Four
hannesfritz
42
3.1k
Embracing the Ebb and Flow
colly
88
5.1k
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!