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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Phil Nash
September 21, 2015
Programming
180
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
460
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
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
130
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
370
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.4k
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
210
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
170
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
330
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
180
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.8k
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
Featured
See All Featured
How to make the Groovebox
asonas
2
2.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
Marketing to machines
jonoalderson
1
5.6k
Making Projects Easy
brettharned
120
6.7k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
260
Chasing Engaging Ingredients in Design
codingconduct
0
240
The Cost Of JavaScript in 2023
addyosmani
55
10k
Accessibility Awareness
sabderemane
1
150
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