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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
190
Constructing Modern UIs with SVG
timgthomas
0
210
Browser Invasion: Desktop Apps and the Web
timgthomas
0
170
Mind the Gap: Bringing Designers and Developers Together
timgthomas
0
140
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
92
Chocolate-Covered Vegetables: Tasty Workflows with Broccoli
timgthomas
0
400
Other Decks in Technology
See All in Technology
CDK Insightsで見る、AIによるCDKコード静的解析(+AI解析)
k_adachi_01
2
170
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
23k
Code Interpreter で、AIに安全に コードを書かせる。
yokomachi
0
6.8k
新メンバーのために、シニアエンジニアが環境を作る時代
puku0x
0
1.1k
「責任あるAIエージェント」こそ自社で開発しよう!
minorun365
7
1.3k
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
800
終盤で崩壊させないAI駆動開発
j5ik2o
2
2.2k
こんなアーキテクチャ図はいやだ / Anti-pattern in AWS Architecture Diagrams
naospon
1
390
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.1k
LLM時代の検索アーキテクチャと技術的意思決定
shibuiwilliam
2
700
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
250
AIエージェントを構築して感じた、AI時代のCDKとの向き合い方
smt7174
1
250
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
Believing is Seeing
oripsolob
1
110
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Utilizing Notion as your number one productivity tool
mfonobong
4
290
How to train your dragon (web standard)
notwaldorf
97
6.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Un-Boring Meetings
codingconduct
0
260
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.1k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
180
Darren the Foodie - Storyboard
khoart
PRO
3
3.2k
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!