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
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
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
490
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
350
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
560
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
540
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
CSC307 Lecture 17
javiergs
PRO
0
320
Contextとはなにか
chiroruxx
0
280
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
Context Engineering - Making Every Token Count
addyosmani
9
960
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
Un-Boring Meetings
codingconduct
0
310
YesSQL, Process and Tooling at Scale
rocio
174
15k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
400
Writing Fast Ruby
sferik
630
63k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
700
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