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
Data: online and off
Search
Phil Nash
September 21, 2015
Programming
0
160
Data: online and off
Phil Nash
September 21, 2015
Tweet
Share
More Decks by Phil Nash
See All by Phil Nash
Four steps from JavaScript to TypeScript
philnash
3
450
JavaScript Apps Go Intl - GIDS Live 2021
philnash
2
290
You're on Mute! WebRTC and our Lives on Screen - GIDS Live 2021
philnash
1
300
Better API DX with a CLI - APIdays Jakarta
philnash
0
360
The trouble with webhooks - at Apidays Live Hong Kong
philnash
2
210
Four steps from JavaScript to TypeScript
philnash
0
410
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
The trouble with webhooks - at APIdays Singapore
philnash
0
310
What's going on with Project Fugu? at DevTalks Reimagined
philnash
0
490
Other Decks in Programming
See All in Programming
Honoとフロントエンドの 型安全性について
yodaka
7
1.5k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
150
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
690
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
930
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
130
複数のAWSアカウントから横断で 利用する Lambda Authorizer の作り方
tc3jp
0
120
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
280
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
480
Ça bouge du côté des animations CSS !
goetter
2
150
コードを読んで理解するko build
bells17
1
110
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
Domain-Driven Design (Tutorial)
hschwentner
13
22k
Featured
See All Featured
Writing Fast Ruby
sferik
628
61k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How GitHub (no longer) Works
holman
314
140k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
A designer walks into a library…
pauljervisheath
205
24k
BBQ
matthewcrist
87
9.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Thoughts on Productivity
jonyablonski
69
4.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Building Adaptive Systems
keathley
40
2.4k
We Have a Design System, Now What?
morganepeng
51
7.4k
Transcript
DATA: ONLINE AND OFF
Phil Nash @philnash http:/ /philna.sh philnash@twilio.com
DATA: ONLINE AND OFF
OFFLINE FIRST
Offline first An application that treats the network as an
enhancement
Not offline first • Graceful failure to network requests •
Just saving data client side
None
None
THINGS TO CONSIDER
ASSETS
SERVICE WORKER
None
USER DATA
None
DATA: ONLINE AND OFF
Data: online and off • Traditional application data storage •
Traditional vs offline first • Browser based data storage • Offline first and data
TRADITIONAL APPLICATION DATA STORAGE
GET / POST
Traditional application data storage 1. POST data to a server
2. Server stores data in a database 1. GET request for data 2. Server interprets request and delivers
OFFLINE?
TRADITIONAL VS OFFLINE FIRST
INTERACT LOCALLY
Interact locally • Save data locally • Retrieve data from
local cache
Interact locally • Crazy fast! • The network doesn't matter
THEN SYNC
Sync • People have multiple devices • Good as a
backup
Sync • Can be asychronous • Can be intentional •
Requires network
DATA STORAGE IN THE FRONT END
LOCALSTORAGE
LocalStorage • Simple key value store • Synchronous (slow)
WEBSQL
WEBSQL
INDEXEDDB
IndexedDB • Asynchronous • o_O
MAKING DATA OFFLINE FIRST
Making data offline first We need something that is: •
Easily distributed • Eventually consistent • Resolves conflicts • Web friendly
None
CouchDB Apache CouchDB™ is a database that uses JSON for
documents, JavaScript for MapReduce indexes, and regular HTTP for its API
None
PouchDB • CouchDB for the browser/Node • Wraps IndexedDB or
WebSQL • LocalStorage adapter available as a plugin
DEMO
Offline first • The time for offline first is now
• Distributing data like this requires a change of mindset • Not all application data needs to be stored this way
Help me! On a scale of 0 to 10, how
likely is it that you would recommend this talk to a friend or colleague? 0203 322 5761
Thanks! @philnash http:/ /philna.sh philnash@twilio.com On a scale of 0
to 10, how likely is it that you would recommend this talk to a friend or colleague? 0203 322 5761