Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Building Offline First apps with Hoodie
Search
Gregor Martynus
March 30, 2017
Technology
620
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Building Offline First apps with Hoodie
Presented at JS.LA March’17. Source code of the demo:
https://github.com/gr2m/sweet.la
Gregor Martynus
March 30, 2017
More Decks by Gregor Martynus
See All by Gregor Martynus
Octokit – Your official GitHub Platform Toolkit
gr2m
2
590
Dedicating Space
gr2m
0
440
Welcoming communities
gr2m
2
540
Offline First – The Good Parts
gr2m
0
500
Creating Inviting Communities
gr2m
1
700
Building Offline First applications with Backbone
gr2m
1
640
noBackend?
gr2m
0
620
Offline First – Made Simple!
gr2m
10
3.2k
WTF IS HOODIE?
gr2m
4
1.6k
Other Decks in Technology
See All in Technology
Let's Change Our World—Again
snoozer05
PRO
6
690
"計画的無茶振り"を通してAIネイティブ世代の新人を育てる
subroh0508
1
110
dbt Semantic Layerで進めるenechainのデータ民主化
akizhou
1
270
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
3
1.2k
顧客価値を追いかけたら、プライシングにたどり着いた
sansantech
PRO
2
1k
freeeにおけるSoftware Factory
freee
PRO
0
540
Agent 活用環境の構築・運用のための AWS サービスのご紹介/agentcore-for-building-and-operating-agents
ren8k
1
150
Obsidian Vault Architectures
x5gtrn
PRO
0
170
AIで選択肢が広がった組織設計の理想と現実
konifar
14
6k
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
330
「作れる」と「リリースできる」の間にあったもの── PdMを外して見えた、PdMがやるべき仕事/Buildable ≠ Shippable: What Removing the PM Taught Me About the PM’s Job
yappli_developers
0
290
DevelopersIO2026 -バックアップは“消されないこと”が9割-
yoshida0129
0
410
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
720
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
940
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
HDC tutorial
michielstock
2
980
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
GraphQLとの向き合い方2022年版
quramy
50
15k
Git: the NoSQL Database
bkeepers
PRO
433
67k
How STYLIGHT went responsive
nonsquared
100
6.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Transcript
OFFLINE FIRST APPS WITH HOODIE @gr2m | js.la March’17
HI, I’M GREGOR! @GR2M ! HOOD.IE ! OFFLINEFIRST.ORG ! NEIGHBOURHOOD.IE
@gr2m | js.la March’17
DEMO ! @gr2m | js.la March’17
RECAP ! @gr2m | js.la March’17
$ mdkir sweet.la $ cd sweet.la # creates package.json $
npm init -y # installs hoodie and sets "start" script $ npm install --save hoodie $ npm start @gr2m | js.la March’17
Load Hoodie Client <script scr="/hoodie/client.js"></script> Data hoodie.store.add({name: 'honey'}) hoodie.store.on('change', renderItems)
Account hoodie.account.signIn({username: 'foo', password: 'secret'}) @gr2m | js.la March’17
hoodie.account.signUp() hoodie.account.signIn() hoodie.account.signOut() hoodie.account.destroy() hoodie.account.on() hoodie.store.add() hoodie.store.find() hoodie.store.findOrAdd() hoodie.store.findAll() hoodie.store.update()
hoodie.store.updateOrAdd() hoodie.store.updateAll() hoodie.store.remove() hoodie.store.removeAll() hoodie.store.pull() hoodie.store.push() hoodie.store.sync() hoodie.store.connect() hoodie.store.disconnect() hoodie.store.on() hoodie.connectionStatus.startChecking() hoodie.connectionStatus.stopChecking() hoodie.connectionStatus.on() @gr2m | js.la March’17
HOW DOES IT WORK? @gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
@gr2m | js.la March’17
HOODIE IS OPEN SOURCE ▸ built with JavaScript, hapi, CouchDB,
PouchDB ▸ extendable with app specific or npm plugins ▸ "most welcoming Open Source community" 1 1 many people say so :) @gr2m | js.la March’17
! HOOD.IE ! GITHUB.COM/HOODIEHQ ! TWITTER.COM/HOODIEHQ @gr2m | js.la March’17
OFFLINE FIRST APPS WITH HOODIE @gr2m | js.la March’17
OFFLINE FIRST APPS WITH HOODIE @gr2m | js.la March’17
OFFLINE FIRST IS AN APPROACH TO BUILD APPS THAT ALWAYS
WORK, WITHOUT ANY LOADING BARS, UNDER ANY NETWORK CONDITIONS. @gr2m | js.la March’17
WHAT MOBILE FIRST WAS TO UI OFFLINE FIRST IS TO
CONNECTIVITY @gr2m | js.la March’17
OFFLINE FIRST IS RELIABLE PERFORMANCE @gr2m | js.la March’17
OFFLINE FIRST TECHNOLOGY @gr2m | js.la March’17
1. ASSETS 2. DATA @gr2m | js.la March’17
1. ASSETS ▸ Install from App Store ▸ Service Worker
▸ AppCache (Deprecated) ▸ ! Think of app updates @gr2m | js.la March’17
2. DATA ▸ Store data offline ▸ Sync ▸ !
Watch out for conflicts / data loss @gr2m | js.la March’17
! REMEMBER ! FRIENDS DON’T LET FRIENDS BUILT THEIR OWN
SYNC ENGINE @gr2m | js.la March’17
OFFLINE FIRST DESIGN @gr2m | js.la March’17
OFFLINE FIRST RULE #1 OFFLINE != ERROR @gr2m | js.la
March’17
OFFLINE FIRST JOY #1 CONVERSION ! @gr2m | js.la March’17
OFFLINE FIRST JOY #2 SAVE? ALL. THE. TIME. @gr2m |
js.la March’17
OFFLINE FIRST JOY #3 SERVER DOWN? MAINTENANCE? ¯\_(ϑ)_/¯ @gr2m |
js.la March’17
OFFLINE FIRST JOY #4 LATENCY? ZERO. @gr2m | js.la March’17
OFFLINE FIRST JOY #5 SECURITY ! ▸ Intranet apps to
go ▸ local encryption @gr2m | js.la March’17
OFFLINE FIRST VIABILITY @gr2m | js.la March’17
UBIQUITOUS CONNECTIVITY IS A MYTH™ @gr2m | js.la March’17
OFFLINE FIRST TRIVIA LTE IN THE US SLOWED DOWN BY
50% IN 20162 2 twinprime.com/lte-has-slowed-by-50-in-the-us/ @gr2m | js.la March’17
OFFLINE FIRST TRIVIA ALMOST 60% OF MOBILE IS 2G3 3
http://www.gsma.com/mobileeconomy/ @gr2m | js.la March’17
OFFLINE FIRST TRIVIA 100 MILLION PEOPLE CAME ONLINE IN INDIA
IN 20164 4 http://www.internetlivestats.com/internet-users-by-country/ @gr2m | js.la March’17
OFFLINE FIRST TRIVIA DO YOU KNOW WHY THE OFFLINE DINOSAUR
IS SO CUTE? @gr2m | js.la March’17
Because you see it so much. @gr2m | js.la March’17
! Questions? @gr2m | js.la March’17
RESOURCES http://offlinefirst.org/ https://medium.com/offline-camp http://hood.ie/blog/say-hello-to-offline-first.html https://nolanlawson.com/2016/10/13/progressive-enhancement-isnt- dead-but-it-smells-funny/ https://pwa.rocks @gr2m | js.la
March’17