SlideShare a Scribd company logo
#MM18PL#MM18PL
Introduction to
Progressive Web Apps
@filrakowski
#MM18PL#MM18PL
Filip Rakowski
Co-founder
Front-end Dev
@filrakowski
This is my face!
#MM18PL#MM18PL
Who knows
what Progressive Web Apps are?
@filrakowski
#MM18PL#MM18PL
How many of you
think PWA is a buzzword?
@filrakowski
#MM18PL#MM18PL
@filrakowski
Let me tell you
about PWA
#MM18PL#MM18PL
„Progressive web apps use modern web APIs along
with traditional progressive enhancement strategy to
create cross-platform web applications. These apps
work everywhere and provide several features that
give them the same user experience advantages as
native apps. ”
~ Mozilla Developer Network
@filrakowski
#MM18PL#MM18PL
Don’t rely on modern APIs.
Always have a fallback
@filrakowski
#MM18PL#MM18PL
@filrakowski
Fast
#MM18PL#MM18PL
@filrakowski
Fast
Reliable
#MM18PL#MM18PL
@filrakowski
Fast
Engaging
Reliable
#MM18PL#MM18PL
Key technology
Service Worker
@filrakowski
#MM18PL#MM18PL
Service Workers are Web Workers that can
intercept navigation and resource requests.
They also work on a separate thread so they
are not terminated with your Web App!
Service Worker
@filrakowski
#MM18PL#MM18PL
Service Worker
@filrakowski
#MM18PL#MM18PL
Service Worker
@filrakowski
Service Worker can work even
when Web App has been closed!
#MM18PL#MM18PL
Service Worker Registration
@filrakowski
#MM18PL#MM18PL
Service Worker Registration
@filrakowski
Just a JavaScript code
#MM18PL#MM18PL
Service Worker
Cache and Offline
@filrakowski
#MM18PL#MM18PL
Service Worker
@filrakowski
Your Web App
https://name.com
Server with API
https://name.com/api
GET https://name.com/api/users
#MM18PL#MM18PL
Service Worker
@filrakowski
Your Web App
https://name.com
Server with API
https://name.com/api
GET https://name.com/api/users
response with users data
#MM18PL#MM18PL
Service Worker
@filrakowski
Your Web App
https://name.com
Server with API
https://name.com/api
GET https://name.com/api/users
error
server is down, lack of
internet connection etc
#MM18PL#MM18PL
Service Worker
@filrakowski
Your Web App
https://name.com
Server with API
https://name.com/api
GET /users
error
server is down, lack of
internet connection etc
Service
Worker/users
#MM18PL#MM18PL
Service Worker
@filrakowski
Your Web App
https://name.com
Server with API
https://name.com/api
GET /users
error
server is down, lack of
internet connection etc
Service
Worker/users
Oops! I can’t fetch /users.
Let’s serve it from cache!
Cache
#MM18PL#MM18PL
Service Worker
@filrakowski
Your Web App
https://name.com
Server with API
https://name.com/api
GET /users
error
server is down, lack of
internet connection etc
Service
Worker/users
Do i have response
for /users cached?
Cache
#MM18PL#MM18PL
Service Worker
@filrakowski
Your Web App
https://name.com
Server with API
https://name.com/api
GET /users
error
server is down, lack of
internet connection etc
Service
Worker/users
Cache
/users
/users
#MM18PL#MM18PL
This was
Network-first caching strategy
@filrakowski
#MM18PL#MM18PL
@filrakowski
#MM18PL#MM18PL
You can do more!
Cache-first strategy
@filrakowski
#MM18PL#MM18PL
@filrakowski
#MM18PL#MM18PL
There is much more about handling Cache
Google.com: ‘Google Offline Cookbook’
@filrakowski
or type https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/
#MM18PL#MM18PL
Service Worker
@filrakowski
Depending on type of a request and handled
circumstances Service Worker decides where to look for a
particular resource:
- Images/fonts always from cache
- JSON data from network
and from cache while offline
- ...
#MM18PL#MM18PL
@filrakowski
Simplify PWA development
https://developers.google.com/web/tools/workbox
#MM18PL#MM18PL
@filrakowski
Runtime Caching
example with Workbox
sw.js
#MM18PL#MM18PL
@filrakowski
#MM18PL#MM18PL
What else you can do with PWA
to improve User Experience?
@filrakowski
#MM18PL#MM18PL
One-click checkout with
Payment Request API
@filrakowski
#MM18PL#MM18PL
@filrakowski
Payment Request API
- One-click checkout without
needing to register or
provide order details
- Credit cards and Shipping
details shared between all
websites making use of
Payment Request API
#MM18PL#MM18PL
@filrakowski
Use traditional checkout as a fallback
#MM18PL#MM18PL
Engage your users by sending
Push Notifications
@filrakowski
#MM18PL#MM18PL
@filrakowski
Web Push Notifications
- Send native Push Notifications on
mobile and desktop
- Deliver them in a real-time from the
background Service Worker even
when your website is closed
#MM18PL#MM18PL
@filrakowski
Notifications API – an interface used to configure and
display notifications to the user
Push API – an interface used to subscribe your app to a
push service and receive push messages in the service
worker
#MM18PL#MM18PL
@filrakowski
Notification & Web Push API
- Ask for subscription (if
user declines you can’t do it
again!!)
- Display notifications from
Service Worker working on
background
Inside Service Worker
#MM18PL#MM18PL
@filrakowski
Let’s learn more!
#MM18PL#MM18PL
Let network requests wait for
stable connectivity with
Background Synchronization
@filrakowski
#MM18PL#MM18PL
@filrakowski
Request Network
Offline network requests
1. Try to reach the network
2. Fail
#MM18PL#MM18PL
@filrakowski
Request
Network
Offline network requests
with background sync
1. Queue task in the
background (Service
Worker)
2. Wait until connectivity is
restored
3. Send it to the server even
when website is closed
#MM18PL#MM18PL
@filrakowski
#MM18PL#MM18PL
What else you can do with PWA
to improve performance?
@filrakowski
#MM18PL#MM18PL
Prefetch resources before they are needed
to stay reliable!
@filrakowski
#MM18PL#MM18PL
1. Workbox precache module
https://developers.google.com/web/tools/work
box/modules/workbox-precaching
2. link rel=”prefetch”
@filrakowski
#MM18PL#MM18PL
Perform computationally expensive tasks without
interrupting user interface (main thread)
in Web Workers!
@filrakowski
#MM18PL#MM18PL
Reminder: Web Worker is a JS code executing
on a different thread which means it’s not
blocking the UI.
@filrakowski
#MM18PL#MM18PL
@filrakowski
Fetch /users for me please!
#MM18PL#MM18PL
@filrakowski
Hey! Sure!
Fetching...
#MM18PL#MM18PL
@filrakowski
Here’s your response!
#MM18PL#MM18PL
@filrakowski
#MM18PL#MM18PL
Bonus! Add to homescreen with
Web App Manifest
@filrakowski
#MM18PL#MM18PL
@filrakowski
#MM18PL#MM18PL
@filrakowski
Web App Manifest
- Add to homescreen like a
native app*
- Display without
browser’s UI so user can’t
see the difference
*from latest chrome version Homescreen
installation banner is not displaying
automatically. You need to run `prompt()`
method on prompt object.
#MM18PL#MM18PL
Workerize - delegate js modules to Web Workers
https://github.com/developit/workerize
ServiceWorkerWare - Express-like request middleware in Service Worker
https://github.com/fxos-components/serviceworkerware
Other awesome PWA stuff https://github.com/hemanth/awesome-pwa
@filrakowski
#MM18PL#MM18PL
You can follow me on twitter where I addictively
tweet about PWA @filrakowski (slides will be
there too)
Thank you!

More Related Content

What's hot

What's hot (17)

Structured Data Implementation, MREIDs, and More at SMX Advanced 2018
Structured Data Implementation, MREIDs, and More at SMX Advanced 2018Structured Data Implementation, MREIDs, and More at SMX Advanced 2018
Structured Data Implementation, MREIDs, and More at SMX Advanced 2018
 
AMP Speeds without AMP Validation
AMP Speeds without AMP ValidationAMP Speeds without AMP Validation
AMP Speeds without AMP Validation
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
PWA - The hidden stories about the future of the web
PWA - The hidden stories about the future of the webPWA - The hidden stories about the future of the web
PWA - The hidden stories about the future of the web
 
FoundConf 2018 Signals Speak - Alexis Sanders
FoundConf 2018 Signals Speak - Alexis SandersFoundConf 2018 Signals Speak - Alexis Sanders
FoundConf 2018 Signals Speak - Alexis Sanders
 
Creating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsCreating Yahoo Mobile Widgets
Creating Yahoo Mobile Widgets
 
Lessons from the other side
Lessons from the other sideLessons from the other side
Lessons from the other side
 
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick StoxPubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
Pubcon Vegas 2017 You're Going To Screw Up International SEO - Patrick Stox
 
2 Seconds is the New Slow - Chris Simmance - under2
2 Seconds is the New Slow -  Chris Simmance - under22 Seconds is the New Slow -  Chris Simmance - under2
2 Seconds is the New Slow - Chris Simmance - under2
 
SEO Meets Automation
SEO Meets AutomationSEO Meets Automation
SEO Meets Automation
 
Query Classification on Steroids with BERT
Query Classification on Steroids with BERTQuery Classification on Steroids with BERT
Query Classification on Steroids with BERT
 
Etech2005
Etech2005Etech2005
Etech2005
 
Using Enhanced Ecommerce for Non-ecommerce @ MeasureCamp Cardiff
Using Enhanced Ecommerce for Non-ecommerce @ MeasureCamp CardiffUsing Enhanced Ecommerce for Non-ecommerce @ MeasureCamp Cardiff
Using Enhanced Ecommerce for Non-ecommerce @ MeasureCamp Cardiff
 
Amp it UP! Using Google Accelerated Mobile Pages with WordPress - WordCamp An...
Amp it UP! Using Google Accelerated Mobile Pages with WordPress - WordCamp An...Amp it UP! Using Google Accelerated Mobile Pages with WordPress - WordCamp An...
Amp it UP! Using Google Accelerated Mobile Pages with WordPress - WordCamp An...
 
Satisfying the Need for Speed (By Aleh Barysevich of SEO PowerSuite, SMX Lond...
Satisfying the Need for Speed (By Aleh Barysevich of SEO PowerSuite, SMX Lond...Satisfying the Need for Speed (By Aleh Barysevich of SEO PowerSuite, SMX Lond...
Satisfying the Need for Speed (By Aleh Barysevich of SEO PowerSuite, SMX Lond...
 
Use Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEO
Use Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEOUse Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEO
Use Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEO
 
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
 

Similar to Introduction to Progressive Web Apps / Meet Magento PL 2018

Similar to Introduction to Progressive Web Apps / Meet Magento PL 2018 (20)

Mobile apps at work for non for profit accountants aicpa
Mobile apps at work for non for profit accountants aicpaMobile apps at work for non for profit accountants aicpa
Mobile apps at work for non for profit accountants aicpa
 
Mobile Apps at Work for Non For Profit Accountants #AICPANFP
Mobile Apps at Work for Non For Profit Accountants #AICPANFPMobile Apps at Work for Non For Profit Accountants #AICPANFP
Mobile Apps at Work for Non For Profit Accountants #AICPANFP
 
Filip Rakowski "Web Performance in modern JavaScript world"
Filip Rakowski "Web Performance in modern JavaScript world"Filip Rakowski "Web Performance in modern JavaScript world"
Filip Rakowski "Web Performance in modern JavaScript world"
 
Learning How to Build Event Streaming Applications with Pac-Man
Learning How to Build Event Streaming Applications with Pac-ManLearning How to Build Event Streaming Applications with Pac-Man
Learning How to Build Event Streaming Applications with Pac-Man
 
Performance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsPerformance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern js
 
Progressive Web Apps – the return of the web?
Progressive Web Apps – the return of the web?Progressive Web Apps – the return of the web?
Progressive Web Apps – the return of the web?
 
Progressive Web Apps: Why you want one & how to optimize them #SMSSYD19
Progressive Web Apps: Why you want one & how to optimize them #SMSSYD19Progressive Web Apps: Why you want one & how to optimize them #SMSSYD19
Progressive Web Apps: Why you want one & how to optimize them #SMSSYD19
 
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
 
SearchMonkey
SearchMonkeySearchMonkey
SearchMonkey
 
Nine Things we're Checking for a Mobile First Index by Nichola Stott in The I...
Nine Things we're Checking for a Mobile First Index by Nichola Stott in The I...Nine Things we're Checking for a Mobile First Index by Nichola Stott in The I...
Nine Things we're Checking for a Mobile First Index by Nichola Stott in The I...
 
Optimizing Web Performance for Mobile Users
Optimizing Web Performance for Mobile UsersOptimizing Web Performance for Mobile Users
Optimizing Web Performance for Mobile Users
 
Max Prin - Engage 2018 - AMP for E-Commerce
Max Prin - Engage 2018 - AMP for E-CommerceMax Prin - Engage 2018 - AMP for E-Commerce
Max Prin - Engage 2018 - AMP for E-Commerce
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017
 
Progressive Web Apps - Goto Chicago 2017
Progressive Web Apps - Goto Chicago 2017Progressive Web Apps - Goto Chicago 2017
Progressive Web Apps - Goto Chicago 2017
 
Balancing Act of Caching LoopConf 2018
Balancing Act of Caching LoopConf 2018Balancing Act of Caching LoopConf 2018
Balancing Act of Caching LoopConf 2018
 
The Modern Java Web Developer Bootcamp - Devoxx 2013
The Modern Java Web Developer Bootcamp - Devoxx 2013The Modern Java Web Developer Bootcamp - Devoxx 2013
The Modern Java Web Developer Bootcamp - Devoxx 2013
 
Magento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second CountsMagento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second Counts
 
Google Cloud: Next'19 Extended Hanoi
Google Cloud: Next'19 Extended HanoiGoogle Cloud: Next'19 Extended Hanoi
Google Cloud: Next'19 Extended Hanoi
 
State management with GraphQL [Angular Minsk, Online, 13.06.20]
State management with GraphQL [Angular Minsk, Online, 13.06.20]State management with GraphQL [Angular Minsk, Online, 13.06.20]
State management with GraphQL [Angular Minsk, Online, 13.06.20]
 
Trends in front end engineering_handouts
Trends in front end engineering_handoutsTrends in front end engineering_handouts
Trends in front end engineering_handouts
 

More from Filip Rakowski (6)

Building resuable and customizable Vue components
Building resuable and customizable Vue componentsBuilding resuable and customizable Vue components
Building resuable and customizable Vue components
 
Vue Storefront MUG
Vue Storefront MUGVue Storefront MUG
Vue Storefront MUG
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developers
 
Vue storefront London PWA meetup
Vue storefront London PWA meetupVue storefront London PWA meetup
Vue storefront London PWA meetup
 
Maintainable design
Maintainable designMaintainable design
Maintainable design
 
Vue Storefront Basics
Vue Storefront BasicsVue Storefront Basics
Vue Storefront Basics
 

Recently uploaded

一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
aagad
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
abhinandnam9997
 

Recently uploaded (12)

一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 

Introduction to Progressive Web Apps / Meet Magento PL 2018

Editor's Notes

  1. I’m gonna talk about something that probably most of you is tired of - Progressive Web Apps. Before I continue I just want to ask two questions.
  2. While in eCommerce industry PWA is obviously a big buzzword representing the modern JS approach to building eCommerce stores the PWA technology itself in my opinion deserves this buzz like nothing else. During this talk I’ll try to show you just a small piece of the stuff you can achieve with PWA technology and trust me - it’s not just about replacing the native apps
  3. First I need to be sure that by saying ‘Progressive Web Apps’ we all mean the same so here is a great definition from Mozilla Dev Network
  4. As the definition may sound complicated in fact it’s very easy and intuitive. Let’s focus on highlited parts. PWA are using modern web api with progressive wnhancement strategy - it means that we are providing a bseline of our apps functionality to everyone no matter what browser they are using and progressively enhancing this functionality with what modern JS APIs can offer. But remember - you can’t rely on a modern APIs always need a fallback.
  5. As the definition may sound complicated in fact it’s very easy and intuitive. Let’s focus on highlited parts. PWA are using modern web api with progressive wnhancement strategy - it means that we are providing a bseline of our apps functionality to everyone no matter what browser they are using and progressively enhancing this functionality with what modern JS APIs can offer. But remember - you can’t rely on a modern APIs always need a fallback.