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
Fault Tolerant UX
Search
Dan Gebhardt
March 04, 2015
Programming
4
900
Fault Tolerant UX
Talk from EmberConf 2015.
Dan Gebhardt
March 04, 2015
Tweet
Share
More Decks by Dan Gebhardt
See All by Dan Gebhardt
An Introduction to the JSON:API Specification
dgeb
5
660
Worker power!
dgeb
0
450
Modern Ember
dgeb
0
130
The Future of Data in Ember
dgeb
0
400
Give Apps Online Superpowers by Optimizing them for Offline
dgeb
2
180
Overview of Orbit.js
dgeb
0
84
Introducing Ember Engines
dgeb
4
3.4k
Introducing JSON API
dgeb
5
670
Ambitious Data Flows with Ember.js and Orbit.js
dgeb
10
1.6k
Other Decks in Programming
See All in Programming
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
530
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
270
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
7
2.8k
Java ジェネリクス入門 2024
nagise
0
610
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
Vue3の一歩踏み込んだパフォーマンスチューニング2024
hal_spidernight
3
3.1k
Realtime API 入門
riofujimon
0
110
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
Outline View in SwiftUI
1024jp
1
160
Hotwire or React? ~Reactの録画機能をHotwireに置き換えて得られた知見~ / hotwire_or_react
harunatsujita
9
4.1k
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
370
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
What's new in Ruby 2.0
geeforr
342
31k
Testing 201, or: Great Expectations
jmmastey
38
7k
Being A Developer After 40
akosma
86
590k
RailsConf 2023
tenderlove
29
880
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Facilitating Awesome Meetings
lara
49
6k
Unsuck your backbone
ammeep
668
57k
Bash Introduction
62gerente
608
210k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Into the Great Unknown - MozCon
thekraken
31
1.5k
Transcript
FA U LT T O L E R A N
T U X D A N G E B H A R D T @ d g e b
None
None
& > < > a > z in r O
m D > 30 3
None
None
None
None
None
None
None
None
None
None
None
None
<html /> J AVA S C R I P T
None
None
None
< M A R K U P / >
None
None
None
None
FA U LT T O L E R A N
C E U X F I R S T
FA U LT T O L E R A N
T U X = = T R A N S A C T I O N A L U X
T R A N S A C T I O
N A L U X • Atomic • Consistent • Isolated • Durable
AT O M I C “ A L L O
R N O T H I N G ”
None
C O N S I S T E N T
M O V E S B E T W E E N VA L I D S TAT E S
None
None
I S O L AT E D A L L
O W S C O N C U R R E N T C H A N G E S
None
D U R A B L E C H A
N G E S P E R S I S T
None
A p p l i c a t i o
n s M U S T N O T V i o l a t e t h e R u l e s o f Tr a n s a c t i o n a l U X O R E L S E
FA U LT T O L E R A N
T U X = = F O R G I V I N G U X
A p p l i c a t i o
n s S H O U L D Tr y t o P ro v i d e a F o rg i v i n g U X ~ p l e a s e ~
T R A N S I T I O N
A L P E R S I S T E N C E
None
U N D O / R E D O
None
O F F L I N E S U P
P O RT
[ Offline ] Ember ToDos
A S Y N C H R O N O
U S ( N O N - B L O C K I N G ) I N T E R FA C E
Syncing… Ember ToDos
E N G I N E E R I N
G FA U LT T O L E R A N C E
E M B E R P R O V I
D E S S I M P L E , E L E G A N T PAT T E R N S F O R B U I L D I N G A C O N S I S T E N T U X
E M B E R D ATA P R O
V I D E S S I M P L E , E L E G A N T PAT T E R N S F O R B U I L D I N G A C O N S I S T E N T + D U R A B L E U X
E M B E R D ATA Atomic Consistent Isolated
Durable = R E Q U I R E S C U S T O M I Z AT I O N Transitional Persistence Undo / Redo Offline Support Asynchronous Interfaces
R E T H I N K A S S
U M P T I O N S A N D P R I M I T I V E S
DISPARATE SOURCES
DISPARATE DATA
COMMON INTERFACES
NORMALIZED DATA
EVENTED CONNECTIONS
PROMISIFIED METHODS doThing
A S TA N D A L O N E
L I B R A RY F O R C O O R D I N AT I N G A C C E S S T O D ATA S O U R C E S A N D K E E P I N G T H E I R C O N T E N T S S Y N C H R O N I Z E D .
PRIMARY INTERFACES { } REQUESTABLE TRANSFORMABLE
REQUESTABLE find add remove update patch findLink addLink removeLink findLinked
TRANSFORMABLE transform(operation)
NORMALIZED DATA JSON Patch transformations: [{"op":"remove",! "path":["planet","f82eed41-3e63-4061-953f-23f74192dcdd"]}! {"op":"add",! "path":["planet","107dc357-7df5-422f-b9d7-817244716e86"],! “value”:{“name”:”Mercury",!
"id":"107dc357-7df5-422f-b9d7-817244716e86"}}]!
CONNECTORS { } REQUEST TRANSFORM
SYNCHRONOUS EVENT HANDLING 1 2 3 4 5 6
1 2 3 4 5 6 7 ??? P P
= Promise SYNCHRONOUS EVENT HANDLING
PROMISE-AWARE EVENTS 1 2 3 4 5 6 7 8
P P P P P = Promise Async Blocking
PROMISE-AWARE EVENTS 1 2 3 ??? 4 5 6 7
P = Promise P P Async Non-Blocking
COMMON LIBRARY
{ } MEMORY JSON API LOCAL STORAGE + MORE +
ORBIT COMMON LIB SOURCES
{ } MODELS KEYS RELATIONSHIPS + MORE + ORBIT COMMON
LIB SCHEMA
+ = ember-orbit
EO.Store all filter retrieve ! find add remove patch findLink
addLink removeLink { } { } Synchronous Asynchronous ember-orbit
Star = EO.Model.extend({! name: attr('string'),! planets: hasMany('planet', {inverse: 'sun'})! });!
! Planet = EO.Model.extend({! name: attr('string'),! classification: attr('string'),! sun: hasOne('star', {inverse: 'planets'})! }); EO.Model ember-orbit
URLS DRIVE APPLICATION STATE
SOURCES DRIVE MODEL STATE ember-orbit
A P P L I C AT I O N
PAT T E R N S
CLIENT-FIRST DEVELOPMENT
PLUGGABLE SOURCES
DATA SYNCHRONIZATION
EDITING CONTEXTS
UNDO / REDO
Twitter: @orbitjs IRC: #orbitjs Github: https://github.com/orbitjs Soon: orbitjs.com
T H A N K S ! @ d g
e b