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
96
Using Skylight to Solve Real-World Performance Problems
chancancode
1
300
Prying Open The Black Box (EmberConf 2018)
chancancode
0
330
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.6k
Other Decks in Programming
See All in Programming
全方位強化 Python 服務可觀測性:以 FastAPI 和 Grafana Stack 為例
blueswen
1
380
標準ライブラリの動向とイテレータのパフォーマンス
makki_d
3
200
Cloud Adoption Framework にみる組織とクラウド導入戦略
tomokusaba
2
440
Pydantic x Database API:turu-pyの開発
yassun7010
1
550
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
160
VS Code extension: ドラッグ&ドロップでファイルを並び替える
ttrace
0
160
ROS 2のZenoh対応とZenohのROS 2対応
takasehideki
2
290
RDBの世界をぬりかえていくモデルグラフDB〜truncus graphによるモデルファースト開発〜
jurabi
0
170
.NET Aspireのクラウド対応検証: Azureと他環境での実践
ymd65536
1
400
2024-10-02 dev2next - Application Observability like you've never heard before
jonatan_ivanov
0
170
CSC509 Lecture 02
javiergs
PRO
0
160
CSC305 Lecture 01
javiergs
PRO
1
150
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
519
39k
How to train your dragon (web standard)
notwaldorf
87
5.6k
Optimizing for Happiness
mojombo
375
69k
GraphQLとの向き合い方2022年版
quramy
43
13k
Bash Introduction
62gerente
608
210k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Fireside Chat
paigeccino
32
3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
GitHub's CSS Performance
jonrohan
1030
450k
From Idea to $5000 a Month in 5 Months
shpigford
380
46k
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