Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building Offline First apps with Hoodie
Search
Gregor Martynus
March 30, 2017
Technology
0
380
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
Tweet
Share
More Decks by Gregor Martynus
See All by Gregor Martynus
Octokit – Your official GitHub Platform Toolkit
gr2m
2
350
Dedicating Space
gr2m
0
290
Welcoming communities
gr2m
2
390
Offline First – The Good Parts
gr2m
0
340
Creating Inviting Communities
gr2m
1
530
Building Offline First applications with Backbone
gr2m
1
490
noBackend?
gr2m
0
410
Offline First – Made Simple!
gr2m
10
3k
WTF IS HOODIE?
gr2m
4
1.5k
Other Decks in Technology
See All in Technology
Entra ID の多要素認証(Japan Microsoft 365 コミュニティ カンファレンス 2024 )
murachiakira
0
1.9k
2024/12/05 AITuber本著者によるAIキャラクター入門 - AITuberの基礎からソフトウェア設計、失敗談まで
sr2mg4
2
320
Advancing the 3D Geospatial Ecosystem in Japan via Global Collaborations
osgeojp
0
130
ドメインロジックで考えるテスタビリティ
leveragestech
1
270
241130紅白ぺぱ合戦LT「編集の技術」
toya524287
5
580
【CNDW2024】SIerで200人クラウドネイティブのファンを増やした話
yuta1979
1
320
Amazon ECSとCloud Runの相互理解で広げるクラウドネイティブの景色 / Mutually understanding Amazon ECS and Cloud Run
iselegant
19
2.4k
A/Aテストにおけるサンプルサイズ/japanr2024
nikkei_engineer_recruiting
1
150
MySQL 8.0 から PostgreSQL 16 への移行と RLS 導入までの道のりと学び
baseballyama
0
250
[GDG DevFest Bangkok 2024] - The Future of Retail E-commerce with Gemini AI
punsiriboo
0
270
知らない景色を見に行こう チャンスを掴んだら道が開けたマネジメントの旅 / Into the unknown~My management journey~
kakehashi
1
290
開発者向けツールを魔改造してセキュリティ診断ツールを作っている話 - 第1回 セキュリティ若手の会 LT
pizzacat83
0
270
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Gamification - CAS2011
davidbonilla
80
5k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
150
How to Think Like a Performance Engineer
csswizardry
21
1.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
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