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
320
You're on Mute! WebRTC and our Lives on Screen - GIDS Live 2021
philnash
1
330
Better API DX with a CLI - APIdays Jakarta
philnash
0
400
The trouble with webhooks - at Apidays Live Hong Kong
philnash
2
240
Four steps from JavaScript to TypeScript
philnash
0
440
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
The trouble with webhooks - at APIdays Singapore
philnash
0
340
What's going on with Project Fugu? at DevTalks Reimagined
philnash
0
540
Other Decks in Programming
See All in Programming
あのころの iPod を どうにか再生させたい
orumin
2
2.4k
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5.7k
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
480
コーディングは技術者(エンジニア)の嗜みでして / Learning the System Development Mindset from Rock Lady
mackey0225
2
470
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
450
未来を拓くAI技術〜エージェント開発とAI駆動開発〜
leveragestech
2
110
Constant integer division faster than compiler-generated code
herumi
2
630
Introduction to Git & GitHub
latte72
0
110
11年かかって やっとVibe Codingに 時代が追いつきましたね
yimajo
1
260
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.1k
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
910
CEDEC 2025 『ゲームにおけるリアルタイム通信への QUIC導入事例の紹介』
segadevtech
3
860
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.4k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Done Done
chrislema
185
16k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Automating Front-end Workflow
addyosmani
1370
200k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
We Have a Design System, Now What?
morganepeng
53
7.7k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
4 Signs Your Business is Dying
shpigford
184
22k
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