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
230
Virtual EmberConf 2021: Platform State of the Union
chancancode
0
210
Virtual EmberConf 2020: Platform State of the Union
chancancode
1
320
Thinking in TypeScript
chancancode
0
260
The Lifecycle of a Rails Request
chancancode
3
14k
Dropping Down To The Metal™ (2018)
chancancode
0
100
Using Skylight to Solve Real-World Performance Problems
chancancode
1
330
Prying Open The Black Box (EmberConf 2018)
chancancode
0
350
Bending The Curve: Putting Rust in Ruby with Helix
chancancode
2
2.7k
Other Decks in Programming
See All in Programming
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
38
14k
Spring gRPC について / About Spring gRPC
mackey0225
0
220
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
170
Conform を推す - Advocating for Conform
mizoguchicoji
3
690
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
PHP ステートレス VS ステートフル 状態管理と並行性 / php-stateless-stateful
ytake
0
100
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
2
420
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
Software Architecture
hschwentner
6
2.1k
color-scheme: light dark; を完全に理解する
uhyo
5
380
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
47
17k
SpringBoot3.4の構造化ログ #kanjava
irof
2
1k
Featured
See All Featured
Being A Developer After 40
akosma
89
590k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
Building Adaptive Systems
keathley
40
2.4k
Embracing the Ebb and Flow
colly
84
4.6k
We Have a Design System, Now What?
morganepeng
51
7.4k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Designing for humans not robots
tammielis
250
25k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
960
Automating Front-end Workflow
addyosmani
1368
200k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
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