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.js: An Antidote To Your Hype Fatigue
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Godfrey Chan
May 07, 2015
Programming
850
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ember.js: An Antidote To Your Hype Fatigue
Godfrey Chan
May 07, 2015
More Decks by Godfrey Chan
See All by Godfrey Chan
Virtual EmberConf 2022: Platform State of the Union
chancancode
0
300
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
230
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
370
Thinking in TypeScript
chancancode
0
310
The Lifecycle of a Rails Request
chancancode
3
14k
Dropping Down To The Metal™ (2018)
chancancode
0
160
Using Skylight to Solve Real-World Performance Problems
chancancode
1
430
Prying Open The Black Box (EmberConf 2018)
chancancode
0
420
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.9k
Other Decks in Programming
See All in Programming
RTSPクライアントを自作してみた話
simotin13
0
490
さぁV100、メモリをお食べ・・・
nilpe
0
130
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
17
5.9k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
590
AIエージェントの隔離技術の徹底比較
kawayu
0
460
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1.1k
dRuby over BLE
makicamel
2
320
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
190
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.5k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
150
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
350
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
8
690
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
Designing for Timeless Needs
cassininazir
1
250
A better future with KSS
kneath
240
18k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A Tale of Four Properties
chriscoyier
163
24k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
400
A Soul's Torment
seathinner
6
2.9k
Crafting Experiences
bethany
1
170
Thoughts on Productivity
jonyablonski
76
5.2k
Transcript
@chancancode
None
None
None
Animated Gifts
Programmer to Thought Leader™ Professional Thought Leadership Angelina Fabbro, Sara
Chipps, Gabe Scholz, Tom Dale, Horse JS, Allen Pike g g n n o o r r w w ™
Chapter 1 Leading By Example Professional Thought Leadership Thought Leadership
Chapter 1 Leading By Example Professional Thought Leadership Thought Leaders
Ship
None
Chapter 2 Create Controversies Kill Your Darlings Professional Thought Leadership
None
None
Thought Leadership Is Dead
Fatigue
Fatigue Fatigue
Fatigue Fatigue Fatigue
Fatigue Fatigue Fatigue Fatigue
Fatigue Fatigue Fatigue Fatigue Fatigue
Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue
Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue
Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue
Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue
Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue Fatigue
JavaScript Frameworks Fatigue
None
Which of these is not a JavaScript Framework?
None
2015 2014 2013 2012 2011 2010 ? “1.0” Releases R.I.P.
2015 2014 2013 2012 2011 2010 ? Reaching “Critical Mass”
Hype
THE HYPE CYCLE PLATEAU OF PRODUCTIVITY SLOPE OF ENLIGHTENMENT TROUGH
OF DISILLUSIONMENT TECHNOLOGY TRIGGER PEAK OF INFLATED EXPECTATIONS VISIBILITY MATURITY Ember in the Real World by Brandon Hays, Fluent Conf
“HYPE” IS NOT AN INSULT, IT’S AN INEVITABILITY PLATEAU OF
PRODUCTIVITY SLOPE OF ENLIGHTENMENT TROUGH OF DISILLUSIONMENT TECHNOLOGY TRIGGER PEAK OF INFLATED EXPECTATIONS VISIBILITY MATURITY Ember in the Real World by Brandon Hays, Fluent Conf
Hype Fatigue
An Antidote to Your Hype Fatigue
None
None
None
“Isn’t Ember dead?”
Big Bets
1. Ambitious Web Applications 2. Future Standards Foresight 3. Stability
Without Stagnation
1. Ambitious Web Applications
Widgets
MVC
Full-fledged Applications
None
Solving the Hard Problems™
MVC
[ MVC ]s
[ MVC ]s + Router
[ MVC ]s + Router + Data Store
[ [ MVC ]s + Router + Data Store ]
+ Testing
[ [ MVC ]s + Router + Data Store ]
+ Testing + Build Tools
[ [ MVC ]s + Router + Data Store ]
+ Testing + Build Tools + Deployment
[ [ [ MVC ]s + Router + Data Store
] + Testing + Build Tools + Deployment ] + Ecosystem
Solving the Hard Problems™ Real World
Solving the Hard Problems™ Real World Boring
“Ember is dead.”
“Apple has stopped innovating.”
Innovations
Ember Inspector
None
None
None
None
None
Ember Data
Models // app/models/post.js export default DS.Model.extend({ title: DS.attr(“string”), body: DS.attr(“string”),
published: DS.attr(“date”), });
Relationships // app/models/post.js export default DS.Model.extend({ title: DS.attr(“string”), body: DS.attr(“string”),
published: DS.attr(“date”), author: DS.belongsTo(“user”), comments: DS.hasMany(“comment”), });
store.find(“post”); store.find(“post”, {q: “Rails”}); store.find(“post”, 1); store.filter(“post”, function(post) { ...
}); store.createRecord(“post”, { title: “Rails is Omakase”, body: “...” }); Identity Store
Data Sources
JSON API
// app/adapters/application.js export default DS.RestAdapter.extend({ host: “https://...” }); // app/adapters/user.js
export default FirebaseAdapter.extend({ firebase: “https://...” }); Data Sources
None
None
Ember CLI
% ember new test-app version: 0.2.3 installing create .bowerrc create
.editorconfig create .ember-cli create .jshintrc create .travis.yml create Brocfile.js create README.md create app/app.js create app/components/.gitkeep create app/controllers/.gitkeep create app/helpers/.gitkeep create app/index.html ... Installed packages for tooling via npm. Installed browser packages via Bower. Successfully initialized git.
None
% ember serve version: 0.2.3 Livereload server on port 35729
Serving on http://localhost:4200/ Build successful - 3774ms. Slowest Trees | Total ----------------------------------------------+--------------------- Concat: Vendor | 3005ms Slowest Trees (cumulative) | Total (avg) ----------------------------------------------+--------------------- Concat: Vendor (1) | 3005ms Babel (2) | 231ms (115 ms)
Generators
% ember generate resource post version: 0.2.3 installing create app/models/post.js
installing create tests/unit/models/post-test.js installing create app/routes/post.js create app/templates/post.hbs installing create tests/unit/routes/post-test.js
Conventions
Assets Pipeline
Modules
JSHint, Babel, etc
Build Tools
Testing
Unit Testing
Acceptance Testing
Browser Testing
Browser Testing Test Harness™
% ember generate resource post version: 0.2.3 installing create app/models/post.js
installing create tests/unit/models/post-test.js installing create app/routes/post.js create app/templates/post.hbs installing create tests/unit/routes/post-test.js
moduleForModel('post'); test('slug', function(assert) { var post = this.subject({ title: 'Rails
is omakase' }); assert.equal(post.get('slug'), 'rails-is-omakase'); });
moduleForComponent('delete-button'); test('delete confirmation', function(assert) { var component = this.subject({ text:
'Delete post' }); component.$().click(); assert.equal(component.$().text(), 'Are you sure?'); });
module('Acceptance: check out', { ... }); test('Express checkout', function(assert) {
visit('/products/agile-web-development-with-rails'); click('#express-checkout'); fillIn('#login .username', 'godfrey'); fillIn('#login .secret', 'secret'); click('#login .submit'); andThen(function() { var confirmation = find('#notice h3').text(); assert.equal(confirmation, 'Thank you for your order'); }); });
% ember test version: 0.2.3 Built project successfully. ok 1
PhantomJS 1.9 - JSHint - .: app.js should pass jshint ok 2 PhantomJS 1.9 - JSHint - helpers: helpers/resolver.js should pass jshint ... ok 11 PhantomJS 1.9 - route:post: it exists 1..11 # tests 11 # pass 11 # fail 0 # ok
% ember test --server
Ember Addons
Coffee Script ember install ember-cli-coffeescript
Sass ember install ember-cli-sass
Mocha ember install ember-cli-mocha
Code Coverage ember install ember-cli-blanket
Sauce Labs ember install ember-cli-sauce
Firebase ember install emberfire
Authentication ember install ember-cli-simple-auth
Animations ember install liquid-fire
Deployment ember install ember-cli-deploy
Canadian Stylesheets ember install ember-cli-canadian-stylesheets
None
~ 1000 addons (and counting)
Big Bets
1. Ambitious Web Applications 2. Future Standards Foresight 3. Stability
Without Stagnation
2. Future Standards Foresight
Programmer to Thought Leader™ JavaScript Thought Leadership Yehuda Katz g
g n n o o r r w w ™
Promises
Routes // app/routes/post.js export default Ember.Route.extend({ model: function(params) { return
$.ajax(“/posts/” + params.post_id); } });
Ember Data store.find(“post”, 1).then(function(post) { ... });
Synergy™ // app/routes/post.js export default Ember.Route.extend({ model: function(params) { return
this.store.find(“post”, params.post_id); } });
Synergy™ // app/routes/post.js export default Ember.Route.extend({ });
Testing module('Acceptance: check out', { ... }); test('Express checkout', function(assert)
{ visit('/products/agile-web-development-with-rails') .then(function() { click('#express-checkout'); }) .then(function() { fillIn('#login .username', 'godfrey'); fillIn('#login .secret', 'secret'); }) .then(function() { click('#login .submit'); }) .then(function() { var confirmation = find('#notice h3').text(); assert.equal(confirmation, 'Thank you for your order'); }); });
Synergy™ module('Acceptance: check out', { ... }); test('Express checkout', function(assert)
{ visit('/products/agile-web-development-with-rails'); click('#express-checkout'); fillIn('#login .username', 'godfrey'); fillIn('#login .secret', 'secret'); click('#login .submit'); andThen(function() { var confirmation = find('#notice h3').text(); assert.equal(confirmation, 'Thank you for your order'); }); });
None
Web Components
Custom Elements
A directive that is restricted to element names with an
isolated scope that uses transclusion.
Ember Components
<my-button ... > ... </my-button>
{{#my-button ...}} ... {{/my-button}}
...for now.
ES 6+
ES6 Modules // app/models/post.js import DS from “ember-data”; export default
DS.Model.extend({ title: DS.attr(“string”), body: DS.attr(“string”), published: DS.attr(“date”), }); // test/unit/models/post-test.js import Post from 'test-app/models/post'; // ...
ES6 Syntax // app/routes/post.js export default Ember.Route.extend({ model(params) { return
$.ajax(`/posts/${ params.post_id) }`); } });
ES6 Classes?
None
The Future Is Now™
ember install ember-cli-computed-decorators
// app/models/user.js import DS from 'ember-data'; import computed from 'ember-computed-decorators';
export default DS.Model.extend({ firstName: DS.attr(“string”), lastName: DS.attr(“string”), @computed(“firstName”, “lastName”) fullName(firstName, lastName) { return `${ firstName } ${ lastName }`; } });
// app/models/user.js import DS from 'ember-data'; import computed from 'ember-computed-decorators';
export default DS.Model.extend({ firstName: DS.attr(“string”), lastName: DS.attr(“string”), @computed(“firstName”, “lastName”) fullName(firstName, lastName) { return `${ firstName } ${ lastName }`; } });
Synergy™
Big Bets
1. Ambitious Web Applications 2. Future Standards Foresight 3. Stability
Without Stagnation
3. Stability Without Stagnation
None
Release Channels
Release Beta Canary
May 1.11 1.12 Beta 3 Apr Mar Feb Jan Dec
Nov Oct Sep Aug 1.10 1.12 Beta 2 1.12 Beta 1 1.11 Beta 5 1.11 Beta 4 1.11 Beta 3 Canary Beta Release 1.11 Beta 2 1.11 Beta 1 1.10 Beta 4 1.10 Beta 3 1.10 Beta 2 1.10 Beta 1 1.9 1.9 Beta 4 1.9 Beta 3 1.9 Beta 1 1.8 1.8 Beta 5 1.8 Beta 4 1.8 Beta 3 1.8 Beta 2 1.8 Beta 1 1.7 1.7 Beta 5 1.7 Beta 4 Bound Attributes HTML Bars Glimmer Block Params Injected Properties New CP Syntax {{component}} Streams Handlebars 2.0 Metamorph 2015
May 1.11 1.12 Beta 3 Apr Mar Feb Jan Dec
Nov Oct Sep Aug 1.10 1.12 Beta 2 1.12 Beta 1 1.11 Beta 5 1.11 Beta 4 1.11 Beta 3 Canary Beta Release 1.11 Beta 2 1.11 Beta 1 1.10 Beta 4 1.10 Beta 3 1.10 Beta 2 1.10 Beta 1 1.9 1.9 Beta 4 1.9 Beta 3 1.9 Beta 1 1.8 1.8 Beta 5 1.8 Beta 4 1.8 Beta 3 1.8 Beta 2 1.8 Beta 1 1.7 1.7 Beta 5 1.7 Beta 4 Bound Attributes HTML Bars Glimmer Block Params Injected Properties New CP Syntax {{component}} Streams Handlebars 2.0 Metamorph 2015
Semantic Versioning
Deprecations
None
Synergy™
RFCs
RFCs
Does it really work?
None
Notable Features Shipped During 1.x 1.2 Router loading/error substates 1.3
Router auto location 1.6 ES6-ify Ember internals 1.7 Query params, nestable routes 1.8 Remove metamorph <script> tags 1.9 Handlebars 2.0, Streams 1.10 HTMLBars, {{else if}}, block params 1.11 Bound attributes
HTMLBars Ember 1.10
Before
// app/templates/post.hbs <h1>{{ post.title }}</h1> <div {{bind-attr class=":post post.isFeatured:featured"}}> {{markdownToHTML
post.body}} </div>
After
// app/templates/post.hbs <h1>{{ post.title }}</h1> <div {{bind-attr class=":post post.isFeatured:featured"}}> {{markdownToHTML
post.body}} </div>
Bound Attributes Ember 1.11
Before
// app/templates/post.hbs <h1>{{ post.title }}</h1> <div {{bind-attr class=":post post.isFeatured:featured"}}> {{markdownToHTML
post.body}} </div>
After
// app/templates/post.hbs <h1>{{ post.title }}</h1> <div {{bind-attr class=":post post.isFeatured:featured"}}> {{markdownToHTML
post.body}} </div>
// app/templates/post.hbs <h1>{{ post.title }}</h1> <div {{bind-attr class=":post post.isFeatured:featured"}}> {{markdownToHTML
post.body}} </div>
Improved
// app/templates/post.hbs <h1>{{ post.title }}</h1> <div class="post {{if post.isFeatured 'featured'}}">
{{markdownToHTML post.body}} </div>
None
Reactive Programming
Notable Features Shipped During 1.x 1.2 Router loading/error substates 1.3
Router auto location 1.6 ES6-ify Ember internals 1.7 Query params, nestable routes 1.8 Remove metamorph <script> tags 1.9 Handlebars 2.0, Streams 1.10 HTMLBars, {{else if}}, block params 1.11 Bound attributes
None
None
None
None
None
Notable Features Shipped During 1.x 1.2 Router loading/error substates 1.3
Router auto location 1.6 ES6-ify Ember internals 1.7 Query params, nestable routes 1.8 Remove metamorph <script> tags 1.9 Handlebars 2.0, Streams 1.10 HTMLBars, {{else if}}, block params 1.11 Bound attributes 1.12 ??? 1.13? Glimmer
Fast Boot™
One-way Binding By Default
Notable Features Shipped During 1.x 1.2 Router loading/error substates 1.3
Router auto location 1.6 ES6-ify Ember internals 1.7 Query params, nestable routes 1.8 Remove metamorph <script> tags 1.9 Handlebars 2.0, Streams 1.10 HTMLBars, {{else if}}, block params 1.11 Bound attributes 1.12 ??? 1.13? Glimmer, One-way binding
Components Everywhere
Notable Features Shipped During 1.x 1.2 Router loading/error substates 1.3
Router auto location 1.6 ES6-ify Ember internals 1.7 Query params, nestable routes 1.8 Remove metamorph <script> tags 1.9 Handlebars 2.0, Streams 1.10 HTMLBars, {{else if}}, block params 1.11 Bound attributes 1.12 ??? 1.13? Glimmer, One-way binding, Routable components, <... />, ...
Ember 2.0
None
Notable Features Shipped During 1.x 1.2 Router loading/error substates 1.3
Router auto location 1.6 ES6-ify Ember internals 1.7 Query params, nestable routes 1.8 Remove metamorph <script> tags 1.9 Handlebars 2.0, Streams 1.10 HTMLBars, {{else if}}, block params 1.11 Bound attributes 1.12 ??? 1.13? Glimmer, One-way binding, Routable components, <... />, ...
Notable Features Shipped With 2.0 < This slide is intentionally
left blank >
Big Bets
1. Ambitious Web Applications 2. Future Standards Foresight 3. Stability
Without Stagnation
None
THE HYPE CYCLE PLATEAU OF PRODUCTIVITY SLOPE OF ENLIGHTENMENT TROUGH
OF DISILLUSIONMENT TECHNOLOGY TRIGGER PEAK OF INFLATED EXPECTATIONS VISIBILITY MATURITY Ember in the Real World by Brandon Hays, Fluent Conf
None
None
An Antidote to Your Hype Fatigue
“Isn’t Ember dead?”
@chancancode