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
170
0
Share
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
550
JavaScript Apps Go Intl - GIDS Live 2021
philnash
2
360
You're on Mute! WebRTC and our Lives on Screen - GIDS Live 2021
philnash
1
370
Better API DX with a CLI - APIdays Jakarta
philnash
0
440
The trouble with webhooks - at Apidays Live Hong Kong
philnash
2
270
Four steps from JavaScript to TypeScript
philnash
0
480
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The trouble with webhooks - at APIdays Singapore
philnash
0
400
What's going on with Project Fugu? at DevTalks Reimagined
philnash
0
610
Other Decks in Programming
See All in Programming
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
120
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
430
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
7
1.2k
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
950
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
200
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
150
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
150
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
300
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
890
見せてもらおうか、 OpenSearchの性能とやらを!
shunta27
1
170
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
5
2.7k
アーキテクチャモダナイゼーションとは何か
nwiizo
15
3.4k
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
710
What's in a price? How to price your products and services
michaelherold
247
13k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.7k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
95
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
210
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
300
Designing Powerful Visuals for Engaging Learning
tmiket
1
320
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
Optimizing for Happiness
mojombo
378
71k
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