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
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
210
Constructing Modern UIs with SVG
timgthomas
0
230
Browser Invasion: Desktop Apps and the Web
timgthomas
0
210
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
420
Other Decks in Technology
See All in Technology
AI時代の「OAuth認証」にどう物申すか?(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
370
EUDIWの枠組みを出発点に民間エコシステムの在り方を考える(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
370
Claude Teamプランの コスト最適化を考える
rfdnxbro
1
830
信頼性はSREだけのものじゃない
hkawaras
0
370
Claude Codeの体系的な理解と知識のフック
oikon48
9
6.2k
internal/testlog で遊ぼう
rokuosan
0
410
「面白い!」を信じ抜け。激動の時代を貫く、オンリーワン・エンジニアの条件
kizawa2020
2
450
いかに伝えるか 〜新卒エンジニアの教育のための、ライトノベル活用の一例
ikedon
1
110
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
VPCでもFloatingIPを使いたいんだ
y_kotani
1
130
AWSとGitHub Actionsの責任境界と 組織で安全に使用する取り組み
nealle
1
230
Digital Credentials API × OpenID4VP ブラウザ完結型本人確認の実装知見(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
360
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
450
Mobile First: as difficult as doing things right
swwweet
225
10k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
390
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
490
Deep Space Network (abreviated)
tonyrice
0
280
Optimizing for Happiness
mojombo
378
71k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
The SEO Collaboration Effect
kristinabergwall1
1
540
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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!