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
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Data: online and off
Phil Nash
September 21, 2015
More Decks by Phil Nash
See All by Phil Nash
Four steps from JavaScript to TypeScript
philnash
3
590
JavaScript Apps Go Intl - GIDS Live 2021
philnash
2
390
You're on Mute! WebRTC and our Lives on Screen - GIDS Live 2021
philnash
1
390
Better API DX with a CLI - APIdays Jakarta
philnash
0
470
The trouble with webhooks - at Apidays Live Hong Kong
philnash
2
300
Four steps from JavaScript to TypeScript
philnash
0
500
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
The trouble with webhooks - at APIdays Singapore
philnash
0
430
What's going on with Project Fugu? at DevTalks Reimagined
philnash
0
640
Other Decks in Programming
See All in Programming
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
140
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
270
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
340
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.5k
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
3
1.6k
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
580
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
470
Typedesign – Prime Four
hannesfritz
42
3.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Limits of Empathy - UXLibs8
cassininazir
1
520
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Mind Mapping
helmedeiros
PRO
1
290
Transcript
DATA: ONLINE AND OFF
Phil Nash @philnash http:/ /philna.sh
[email protected]
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
[email protected]
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