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
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
250
Icons and the Web: Symbols of the Modern Age
timgthomas
0
180
Constructing Modern UIs with SVG
timgthomas
0
210
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
160
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
140
Ember ATX: Components
timgthomas
0
89
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
400
Other Decks in Technology
See All in Technology
Why we keep our community?
kawaguti
PRO
0
380
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
420
遊びで始めたNew Relic MCP、気づいたらChatOpsなオブザーバビリティボットができてました/From New Relic MCP to a ChatOps Observability Bot
aeonpeople
1
150
Cursor Subagentsはいいぞ
yug1224
2
140
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
270
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
I ran an automated simulation of fake news spread using OpenClaw.
zzzzico
1
700
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
330
AI時代のシステム開発者の仕事_20260328
sengtor
0
320
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
120
Zephyr(RTOS)でOpenPLCを実装してみた
iotengineer22
0
180
互換性のある(らしい)DBへの移行など考えるにあたってたいへんざっくり
sejima
PRO
0
530
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
160
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Tell your own story through comics
letsgokoyo
1
880
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.5k
Why Our Code Smells
bkeepers
PRO
340
58k
Navigating Weather and Climate Data
rabernat
0
160
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
250
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
700
Music & Morning Musume
bryan
47
7.1k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Context Engineering - Making Every Token Count
addyosmani
9
790
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!