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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
What happened to RubyGems and what can we learn?
mikemcquaid
0
300
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
310
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
210
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
190
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
240
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
610
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
コミュニティが変えるキャリアの地平線:コロナ禍新卒入社のエンジニアがAWSコミュニティで見つけた成長の羅針盤
kentosuzuki
0
120
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
140
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
Tebiki Engineering Team Deck
tebiki
0
24k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.9k
Featured
See All Featured
We Are The Robots
honzajavorek
0
160
Everyday Curiosity
cassininazir
0
130
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building an army of robots
kneath
306
46k
GraphQLとの向き合い方2022年版
quramy
50
14k
Test your architecture with Archunit
thirion
1
2.2k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
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!