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
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
TED_modeki_共創ラボ_20251203.pdf
iotcomjpadmin
0
170
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
9
17k
M&Aで拡大し続けるGENDAのデータ活用を促すためのDatabricks権限管理 / AEON TECH HUB #22
genda
0
290
20251222_サンフランシスコサバイバル術
ponponmikankan
2
150
[Data & AI Summit '25 Fall] AIでデータ活用を進化させる!Google Cloudで作るデータ活用の未来
kirimaru
0
4.1k
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
510
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
790
Authlete で実装する MCP OAuth 認可サーバー #CIMD の実装を添えて
watahani
0
290
SQLだけでマイグレーションしたい!
makki_d
0
1.2k
Strands AgentsのEvaluatorをLangfuseにぶち込んでみた
andoooooo_bb
0
100
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
3
210
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
120
Featured
See All Featured
A Soul's Torment
seathinner
1
2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
0
980
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
120
Typedesign – Prime Four
hannesfritz
42
2.9k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
0
46
GitHub's CSS Performance
jonrohan
1032
470k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
24
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Utilizing Notion as your number one productivity tool
mfonobong
2
190
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!