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
180
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
87
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
390
Other Decks in Technology
See All in Technology
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
960
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
440
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
190
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
120
OpenShiftでllm-dを動かそう!
jpishikawa
0
110
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
今日から始めるAmazon Bedrock AgentCore
har1101
4
410
What happened to RubyGems and what can we learn?
mikemcquaid
0
300
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
300
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
370
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
580
Featured
See All Featured
From π to Pie charts
rasagy
0
120
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
GitHub's CSS Performance
jonrohan
1032
470k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
730
YesSQL, Process and Tooling at Scale
rocio
174
15k
Typedesign – Prime Four
hannesfritz
42
2.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
How to Talk to Developers About Accessibility
jct
2
130
The agentic SEO stack - context over prompts
schlessera
0
640
Building a Scalable Design System with Sketch
lauravandoore
463
34k
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!