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
170
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
86
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
390
Other Decks in Technology
See All in Technology
Kaggleコンペティション「MABe Challenge - Social Action Recognition in Mice」振り返り
yu4u
1
390
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
190
SwiftDataを覗き見る
akidon0000
0
220
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
210
AI時代のアジャイルチームを目指して ー スクラムというコンフォートゾーンからの脱却 ー / Toward Agile Teams in the Age of AI
takaking22
11
6.6k
「違う現場で格闘する二人」——社内コミュニティがつないだトヨタ流アジャイルの実践とその先
shinichitakeuchi
0
380
BidiAgent と Nova 2 Sonic から考える音声 AI について
yama3133
2
160
Models vs Bounded Contexts for Domain Modularizati...
ewolff
0
190
【Agentforce Hackathon Tokyo 2025 発表資料】みらいシフト:あなた働き方を、みらいへシフト。
kuratani
0
120
旬のブリと旬の技術で楽しむ AI エージェント設計開発レシピ
chack411
1
260
善意の活動は、なぜ続かなくなるのか ーふりかえりが"構造を変える判断"になった半年間ー
matsukurou
0
510
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
1
1.2k
Featured
See All Featured
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
120
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
130
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
890
The Cult of Friendly URLs
andyhume
79
6.8k
How to Ace a Technical Interview
jacobian
281
24k
Automating Front-end Workflow
addyosmani
1371
200k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Faster Mobile Websites
deanohume
310
31k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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!