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
510
JavaScript Apps Go Intl - GIDS Live 2021
philnash
2
310
You're on Mute! WebRTC and our Lives on Screen - GIDS Live 2021
philnash
1
320
Better API DX with a CLI - APIdays Jakarta
philnash
0
390
The trouble with webhooks - at Apidays Live Hong Kong
philnash
2
230
Four steps from JavaScript to TypeScript
philnash
0
440
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
The trouble with webhooks - at APIdays Singapore
philnash
0
340
What's going on with Project Fugu? at DevTalks Reimagined
philnash
0
530
Other Decks in Programming
See All in Programming
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
120
Deep Dive into ~/.claude/projects
hiragram
12
2.4k
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
130
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
600
すべてのコンテキストを、 ユーザー価値に変える
applism118
3
1.2k
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
100
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
0
4.1k
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
500
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
1
14k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
420
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
440
GraphRAGの仕組みまるわかり
tosuri13
8
530
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Designing for humans not robots
tammielis
253
25k
Testing 201, or: Great Expectations
jmmastey
42
7.6k
Stop Working from a Prison Cell
hatefulcrawdad
270
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Git: the NoSQL Database
bkeepers
PRO
430
65k
How to train your dragon (web standard)
notwaldorf
94
6.1k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
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