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
110
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
200
Icons and the Web: Symbols of the Modern Age
timgthomas
0
160
Constructing Modern UIs with SVG
timgthomas
0
180
Browser Invasion: Desktop Apps and the Web
timgthomas
0
150
Mind the Gap: Bringing Designers and Developers Together
timgthomas
0
120
Zero to App Store: A Hybrid App’s Tale
timgthomas
1
140
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
120
Ember ATX: Components
timgthomas
0
82
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
370
Other Decks in Technology
See All in Technology
衝突して強くなる! BLUE GIANTと アジャイルチームの共通点とは ― いきいきと活気に満ちたグルーヴあるチームを作るコツ ― / BLUE GIANT and Agile Teams
naitosatoshi
0
300
おやつは300円まで!の最適化を模索してみた
techtekt
PRO
0
270
異業種出身エンジニアが気づいた、転向して十数年経っても変わらない自分の武器とは
macnekoayu
0
270
個人CLAUDE.md紹介と設定から学んだこと/introduce-my-claude-md
shibayu36
0
180
制約理論(ToC)入門
recruitengineers
PRO
9
3.7k
AWS環境のリソース調査を Claude Code で効率化 / aws investigate with cc devio2025
masahirokawahara
2
1.1k
【Grafana Meetup Japan #6】Grafanaをリバプロ配下で動かすときにやること ~ Grafana Liveってなんだ ~
yoshitake945
0
220
Nstockの一人目エンジニアが 3年間かけて向き合ってきた セキュリティのこととこれから〜あれから半年〜
yo41sawada
0
190
クラウドセキュリティを支える技術と運用の最前線 / Cutting-edge Technologies and Operations Supporting Cloud Security
yuj1osm
2
260
AI時代に非連続な成長を実現するエンジニアリング戦略
sansantech
PRO
3
970
Grafana MCPサーバーによるAIエージェント経由でのGrafanaダッシュボード動的生成
hamadakoji
1
1.1k
『FailNet~やらかし共有SNS~』エレベーターピッチ
yokomachi
1
200
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
696
190k
Code Reviewing Like a Champion
maltzj
525
40k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
510
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Unsuck your backbone
ammeep
671
58k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
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!