Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
170
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
540
JavaScript Apps Go Intl - GIDS Live 2021
philnash
2
340
You're on Mute! WebRTC and our Lives on Screen - GIDS Live 2021
philnash
1
350
Better API DX with a CLI - APIdays Jakarta
philnash
0
420
The trouble with webhooks - at Apidays Live Hong Kong
philnash
2
260
Four steps from JavaScript to TypeScript
philnash
0
460
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
The trouble with webhooks - at APIdays Singapore
philnash
0
370
What's going on with Project Fugu? at DevTalks Reimagined
philnash
0
590
Other Decks in Programming
See All in Programming
Java 25, Nuevas características
czelabueno
0
110
Basic Architectures
denyspoltorak
0
120
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
470
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.9k
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
Vibe codingでおすすめの言語と開発手法
uyuki234
0
110
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3k
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
130
Grafana:建立系統全知視角的捷徑
blueswen
0
190
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
Cell-Based Architecture
larchanjo
0
140
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
860
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Mind Mapping
helmedeiros
PRO
0
39
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
89
KATA
mclloyd
PRO
33
15k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
30
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Believing is Seeing
oripsolob
0
15
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