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
FastBoot™ and Beyond
Search
Godfrey Chan
September 29, 2015
Programming
0
140
FastBoot™ and Beyond
Godfrey Chan
September 29, 2015
Tweet
Share
More Decks by Godfrey Chan
See All by Godfrey Chan
Virtual EmberConf 2022: Platform State of the Union
chancancode
0
220
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
200
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
310
Thinking in TypeScript
chancancode
0
250
The Lifecycle of a Rails Request
chancancode
3
13k
Dropping Down To The Metal™ (2018)
chancancode
0
97
Using Skylight to Solve Real-World Performance Problems
chancancode
1
310
Prying Open The Black Box (EmberConf 2018)
chancancode
0
340
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.6k
Other Decks in Programming
See All in Programming
Android 15 でアクションバー表示時にステータスバーが白くなってしまう問題
tonionagauzzi
0
140
Macとオーディオ再生 2024/11/02
yusukeito
0
150
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
Vue3の一歩踏み込んだパフォーマンスチューニング2024
hal_spidernight
3
3.1k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
990
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.7k
CSC305 Lecture 13
javiergs
PRO
0
130
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
1.7k
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
200
EventSourcingの理想と現実
wenas
6
2.1k
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.6k
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
290
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Testing 201, or: Great Expectations
jmmastey
38
7k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Music & Morning Musume
bryan
46
6.1k
Designing for humans not robots
tammielis
249
25k
What's new in Ruby 2.0
geeforr
342
31k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
150
GitHub's CSS Performance
jonrohan
1030
460k
Transcript
Godfrey Chan @chancancode
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Ember 1.0
<script src=“ember.js”> <script src=“my-app.js”> DOM Ready Boot App appendTo(document.body)
<script src=“ember.js”> <script src=“my-app.js”> DOM Ready Boot App appendTo(document.body)
TAKE OVER ALL THE DOM!
The One True App™
Testing
Emergency Brake
App.setupForTesting()
App.setupForTesting() <script src=“ember.js”> <script src=“my-app.js”> DOM Ready Boot App appendTo(document.body)
App.setupForTesting() <script src=“ember.js”> <script src=“my-app.js”> DOM Ready Boot App appendTo(document.body)
Actually, never mind!
App.setupForTesting() <script src=“ember.js”> <script src=“my-app.js”> Test Setup Boot App appendTo(“#qunit-fixture”)
Test Teardown App.reset()
FastBoot™
None
<noscript> Sorry </noscript>
☁ Web Server
☁ Web Server GET /posts/123-ember-2-0-…
☁ Web Server 200 OK <html> <head> <title>Ember 2.0…</title> </head>
<body> <article>…</article> </body> </html>
Load Ember Boot Worker Boot App Render Destroy Worker GET
/posts/123-ember-2-0-… 200 OK <html> <head> <title>Ember 2.0…</title> </head> <body> <article>…</article> </body> </html>
Load Ember Boot Worker Boot App Render App.reset() GET /posts/123-ember-2-0-…
200 OK <html> <head> <title>Ember 2.0…</title> </head> <body> <article>…</article> </body> </html>
200 OK <html> <head> <title>Ember 2.0…</title> </head> <body> <article>…</article> </body>
</html> Render 200 OK <html> <head> <title>Ember 2.0…</title> </head> <body> <article>…</article> </body> </html> GET /posts/123-ember-2-0-… Boot Worker Render instance.destroy() GET /posts/123-ember-2-0-… Boot Instance instance.destroy( Load Ember Boot Instance
Ember 1.12
Ember.ApplicationInstance Ember.Application
Ember.ApplicationInstance Ember.Application
App.visit(“/posts/123-ember-2-0…”)
⚠ Experimental APIs
For Your Eyes Only
PR #12394 Revisiting the visit API (aka FastBoot™)
Testing
<script src=“ember.js”> <script src=“my-app.js”> Test Setup Boot Instance … instance.destroy()
Manual Boot
import MyApp from 'my-app'; $(function() { let App = MyApp.create({
autoboot: false }); App.visit('/demo', { location: 'none', rootElement: '#demo' }); }); For Your Eyes Only
Multiple Instances
import MyApp from 'my-app'; $(function() { let App = MyApp.create({
autoboot: false }); let sessionId = MyApp.generateSessionID(); App.visit(`/matches/join/${sessionId}`, { rootElement: '#left' }); App.visit(`/matches/join/${sessionId}`, { rootElement: '#right' }); }); For Your Eyes Only
Widgets
ember-islands
Embedding?
PR #12394 Revisiting the visit API (aka FastBoot™)
@chancancode