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
How not to mess up your first PWA
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Dmitri Pisarev
June 18, 2020
Programming
65
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How not to mess up your first PWA
Dmitri Pisarev
June 18, 2020
More Decks by Dmitri Pisarev
See All by Dmitri Pisarev
React State Management
dimaip
0
140
Closing the Gap - For all who are tired of choosing between Apps and Websites
dimaip
0
60
Docker 101 - From Development to Production and back
dimaip
0
150
Your CSS Code Needs an Architect
dimaip
0
51
Other Decks in Programming
See All in Programming
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
Railsバージョンを4倍にした話
optim
0
370
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
470
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.1k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
340
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
410
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
620
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
How to Ace a Technical Interview
jacobian
280
24k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Building AI with AI
inesmontani
PRO
1
1.3k
A Tale of Four Properties
chriscoyier
163
24k
GitHub's CSS Performance
jonrohan
1033
470k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
Transcript
Dmitri Pisarev, Neos Conference 2020 How not to Mess up
Your First PWA Wish I knew this stuff earlier…
- Christian believer ❤ - Into web dev since 2005
- Volunteer @ SFI.ru - Part-time @ DEED - team member Dmitri Pisarev Me, COVID-19 edition @dimaip dimaip.github.io
https://c.psmb.ru
None
http://dimaip.github.io/2015/11/15/react-neos/ https://github.com/bwaidelich/Wwwision.Neos.GraphQL
Some research
None
None
None
Why Native Apps are so engaging? + offline, performance, reliability
+ push notifications + home screen icon, OS integration + hardware access
Native Apps + Web React Native Flutter, Xamarin Cordova/Capacitor -
3x effort - Web is an afterthought - Yoga !== CSS - No JS no Love - WebView << Safari/Chrome - App Store review?! Options?
How about PWAs?
What are PWAs? + Offline (ServiceWorker) + push notifications (WebPush)
+ home screen icon (manifest.json) + other cool web APIs
Useful Web APIs + WebShare + WebAuthn + RequestPayment +
WebRTC + WebPush
iOS + SW support since iOS 11.3 - No App
Store - No push notifications - No install prompt - No SW in WKWebView Support Android + PWA paradise! + Submit to Play Market as Trusted Web Activity
Mobile Integration
Desktop Integration
https://love2dev.com/pwa/
Let’s write some code!
Challenge 1. ServiceWorkers are rocket science
manifest.json index.html
Let’s go offline some.js sw.js
We are stuck! - Reload? - Restart device? - Delete
service worker? - Replace with empty service worker? ⏳ - HTTP header Clear-Site-Data: "*"
Caching Strategies - Stale-While-Revalidate - Cache First (Cache Falling Back
to Network) - Network First (Network Falling Back to Cache) - Network Only Hand-rolling is hard and dangerous!
Workbox to mask some complexity Warning! Workbox is a leaky
abstraction! sw.js
Challenge 2. Getting PWA to self-update
Service Worker Lifecycle
sw.js
https://redfin.engineering/service-workers-break-the-browsers-refresh-button-by-default-here-s-why-56f9417694 Must read:
Don’t wait for reload …on iOS 12 it may not
happen soon
Challenge 3. Deploying an app with code-splitting
Deploying an app with code-splitting
Solution 1. Keep previous versions of assets PROS: the most
reliable solution CONS: not many platforms support it out of the box
Solution 2. Catch exceptions and force-reload SW PROS: works with
all deployment platforms CONS: horrible UX for stateful apps
Solution 3. Pre-cache all JS bundles with a service worker
PROS: prefetching makes sense in many cases anyways CONS: does not conserve bandwidth
Make it look native
Viewport, Icons, loading screen
CSS to disable some browser effects Use with caution and
keep a11y in mind!
Meet platform expectations!
Ionic Components
Dark Mode
Useful tools
None
pwabuilder.com
None
1. Choose the right platform 2. Make sure you understand
Service Workers well 3. Pretend to be native Too long; Didn’t listen
It’s open source! ❤ github.com/dimaip/calendar
@dimaip dimaip.github.io dev.to/dimaip Say Hi!