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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
200
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
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
180
ホームラボ紹介
y_sera15
0
140
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
370
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
310
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
160
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
390
AIコーディングの次。コードレビューと理解負荷を解消して組織の開発生産性を高める
moongift
PRO
2
2.4k
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
220
強化学習「理論」入門
enakai00
3
3.6k
個人OSSが、机の上から世界に広がるまでの話
shinyasaita
1
380
Genie Codeハンズオン基礎編
taka_aki
1
100
20260804_Q4AzureUpdateBite_FabricDataAgentの精度を高める設計.pdf
matayuuu
1
120
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
930
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Embracing the Ebb and Flow
colly
88
5.1k
New Earth Scene 8
popppiees
3
2.5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
400
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
990
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Producing Creativity
orderedlist
PRO
348
40k
Become a Pro
speakerdeck
PRO
31
6.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Navigating Weather and Climate Data
rabernat
0
470
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!