Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ember ATX: Ember.Evented
Search
timgthomas
July 24, 2015
Technology
130
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
280
Icons and the Web: Symbols of the Modern Age
timgthomas
0
220
Constructing Modern UIs with SVG
timgthomas
0
240
Browser Invasion: Desktop Apps and the Web
timgthomas
0
210
Mind the Gap: Bringing Designers and Developers Together
timgthomas
0
160
Zero to App Store: A Hybrid App’s Tale
timgthomas
1
200
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
180
Ember ATX: Components
timgthomas
0
110
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
430
Other Decks in Technology
See All in Technology
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
2
970
人間はどの意思決定を手放せるのか
kawasima
15
7.6k
Minecraft JavaのMODをSwiftで作る
1mash0
0
190
Genieを崇めよ
kameitomohiro
0
170
SREの視点で考えるSIEM活用術 〜AWS環境でのセキュリティ強化〜
cscengineer
PRO
0
130
AIで社員の自主発信に広報目線を組み込む
_mossann_t
0
130
SREへの勘違いに気づいた後の話
tomodakengo
0
110
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
0
200
Claude Code本って、 読む必要あるの?
oikon48
2
490
ソフトウェアDNAとクラウドエージェントのススメ
cloudace
0
120
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.3k
AI時代、データエンジニアが一番おもろい
genshun9
0
670
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
How to build a perfect <img>
jonoalderson
1
6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
420
Chasing Engaging Ingredients in Design
codingconduct
0
320
For a Future-Friendly Web
brad_frost
183
10k
Crafting Experiences
bethany
1
350
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Into the Great Unknown - MozCon
thekraken
41
2.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
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!