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 2.0 - RFC Recap
Search
Robert Jackson
November 13, 2014
Programming
710
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ember 2.0 - RFC Recap
Video:
http://youtu.be/69wMY3CaklY?t=1h8m49s
Robert Jackson
November 13, 2014
More Decks by Robert Jackson
See All by Robert Jackson
😂 of TypeScript
rwjblue
0
370
Testing: The Modern Way
rwjblue
0
77
Glimmer ✨ as a Gateway to Ember 🐹
rwjblue
0
93
Testing: The Future... Today?
rwjblue
0
86
Rails Developer's Intro to Ember
rwjblue
1
210
Testing - The Next Frontier
rwjblue
1
110
A tale of two pods
rwjblue
3
890
Ember CLI Addons
rwjblue
7
830
RAILS + EMBER.JS + EMBER-CLI = ❤
rwjblue
10
1.9k
Other Decks in Programming
See All in Programming
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
770
AIで効率化できた業務・日常
ochtum
0
110
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
660
LLM Plugin for Node-REDの利用方法と開発について
404background
0
160
Inside Stream API
skrb
1
650
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
17
6.2k
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
450
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
320
CSC307 Lecture 17
javiergs
PRO
0
320
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
107
250k
Chasing Engaging Ingredients in Design
codingconduct
0
210
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
How GitHub (no longer) Works
holman
316
150k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Code Reviewing Like a Champion
maltzj
528
40k
Mobile First: as difficult as doing things right
swwweet
225
10k
It's Worth the Effort
3n
188
29k
Transcript
Ember 2.0
Who the heck is this guy? • DockYarder • Ember
Core Team • General Open Source Addict twitter: rwjblue github: rwjblue
Thank You!!
Ember 2.0? https://github.com/emberjs/rfcs/pull/15
What is planned? • Template Updates • Components • Ember
CLI • Simplify Concepts
Template Updates
Templates • Attribute Bindings • Components • Block Parameters •
Sane Context • One-way Bindings
Templates: Attribute Bindings
Templates: Attribute Bindings Today: <a {{bind-attr href=url}}>Click here</a>
Templates: Attribute Bindings Tomorrow: <a href={{url}}>Click here</a>
Templates: Attribute Bindings Tomorrow (interpolation): <img alt="{{firstName}}'s picture"></img>
Templates: Attribute Bindings Tomorrow (class syntax): <div class="{{if prop "is-truthy"
"is-falsey"}}">
Templates: Components
Templates: Components Today: {{audio-player src=audioSource started="playing" stopped="paused" }}
Tomorrow: <audio-player src={{audioSource}} started={{action "playing"}} stopped={{action "paused"}} > Templates: Components
Templates: Block Parameters
Today: <ul> {{#each todo in todos}} <li>{{todo.title}}</li> {{/each}} </ul> Templates:
Block Parameters
Tomorrow: <ul> {{#each todos as |todo|}} <li>{{todo.title}}</li> {{/each}} </ul> Templates:
Block Parameters
Templates: Block Parameters Tomorrow? <form-for model as |f|> {{f.input model.name}}
{{f.input model.title}} </form-for>
Templates: Sane Context
Today: <ul> {{#each todos}} <li>{{title}}</li> {{/each}} </ul> Templates: Sane Context
Tomorrow: <ul> {{#each todos as |todo|}} <li>{{todo.title}}</li> {{/each}} </ul> Templates:
Sane Context
Templates: One-way Bindings
Templates: One-way Bindings <some-component foo={{bar}}> </some-component> `bar` cannot be changed
by `some-component`
Templates: One-way Bindings <some-component foo={{mut bar}}> </some-component> `bar` can be
changed by `some-component`
Templates: One-way Bindings <some-component foo={{bar}} update={{action "updateBar"}}> </some-component>
Templates: One-way Bindings // app/components/some-component.js export default Component.extend({ keypress: function()
{ this.attrs.update(this.getCurrentValue()); } });
Components
• Attributes • Actions • Routable Components Components
Components: Attributes
Template: <x-foo name={{model.name}} city={{model.city}} > </x-foo> Components: Attributes
Component: XFooComponent.create({ attrs: { name: "Robert", city: "Boston" } });
Components: Attributes
Components: Attributes actions: { doSomething: function() { this.set('attrs.name', 'Max'); }
}
Components: Attributes Assertion: You can’t set `attrs.name`!
Template: <x-foo name={{mut model.name}} city={{model.city}} > </x-foo> Components: Attributes
Components: Actions
Components: Actions Template (today): {{audio-player start="playing" stop="paused"}}
Components: Actions Component (today): AudioPlayerComponent.extend({ play: function() { this.sendAction('start'); }
});
Components: Actions Template (tomorrow): <audio-player start={{action "playing"}} stop={{action "paused"}} >
Components: Actions Component (tomorrow): AudioPlayerComponent.extend({ play: function() { this.attrs.start(); }
});
Components: Routable
Components: Routable // Ember.Route implementation attrs: function() { return {
model: this.model(); } }
Components: Routable // Ember.Route implementation setupComponent: function(Component) { return RSVP.hash(this.attrs())
.then(function(attrs) { return Component.create(attrs); }); }
Components: Routable // Ember.Route implementation setupComponent: function(Component) { return RSVP.hash(this.attrs())
.then(function(attrs) { return Component.create(attrs); }); }
Ember CLI
Ember CLI • Refactor API doc examples • Refactor Guides
• Update emberjs.com
Simplify Concepts
The End