SlideShare a Scribd company logo
1 of 18
Progressive Web Apps Dev Summit
Gbolahan Alli
July 23rd , 2016
● Service Worker
● Caching Strategies
● App Shell
● Manifest Files
● Codelabs
Agenda
What is a Progressive Web App ?
Experiences that combine the best of web with the best of
app and becomes useful to users from the very first visit in
a tab.
No Install Required
Key Characteristics of PWA
●Progressive - Works for every user regardless of
browser and users
●Responsive - Fits any form factor; desktop,mobile,tablet
etc
●Connectivity Independent - Enhanced with
Service Workers to Work Offline or on Lie-
Fi.
Key Characteristics of PWA - cont’d
●App Like - Feels like an app to the user because it’s built
on the app-shell model
●Re-engageable - Makes re-engagement easy through
features like push notifications.
●Installable - Allows user to ‘keep’ apps on
their homescreen without the hassle of an
app store.
Key Characteristics of PWA - cont’d
●Fresh - Always up to date courtesy of service worker
update process
●Safe - Served via HTTPS to prevent snooping and
ensure content isn’t tampered with.
Our Discussion - today
●Connectivity Independent
●App - like
●Installable
Connectivity Independent
What is a Service Worker ?
A script run by the browser in the background, separate from a
webpage, that opens the door to features which don’t need a web page
or user interaction
Read more : http://www.html5rocks.com/en/tutorials/service-worker/introduction/
Service Workers
Things to note
× Can’t access the DOM directly. Only way to communicate with pages
is through postMessage.
× Service worker can “hijack” network requests, giving you the
developer absolute control.
× Terminated when idle. Restarted needed.
× Persist data using IndexedDb or something similar1
× Service workers make extensive use of promises2
Read more : http://www.html5rocks.com/en/tutorials/service-worker/introduction/
, http://www.html5rocks.com/tutorials/es6/promises/
Service Workers - LifeCycle
Service Workers - Registering
( function() {
'use strict';
if (navigator.serviceWorker) {
//Registration Logic goes here
}
})();
Service Workers - Events
self.addEventListener(‘install’, function(reg) { // LOGIC GOES HERE
})
self.addEventListener(‘activate’, function(event) { //LOGIC GOES HERE
})
self.addEventListener(‘fetch’, function(event) {//LOGIC GOES HERE
})
self.addEventListener(‘message’, function(event) {
//LOGIC GOES HERE
})
Installable - Manifest.json
● User can Add App to Homescreen
● Easy access to Web App from homescreen
● Add a Manifest.json file to your app’s directory
Read more : https://www.w3.org/TR/2016/WD-appmanifest-20160331/
Installable - Manifest.json
{
"short_name": "",
"name": "",
"icons": [ {
"src":"",
"sizes": "",
"type": ""
} ],
"start_url": "",
"background_color": "",
"theme_color": "",
"display": ""
}
Read more : https://www.w3.org/TR/2016/WD-appmanifest-20160331/
Caching Strategies - Responding to
request
Read More : https://jakearchibald.com/2014/offline-cookbook/
https://jakearchibald.com/2016/caching-best-practices/
● Cache Only
● Network Only
● Cache, falling back to Network
● Cache & Network Race
● Network, falling back to Cache
● Cache then network
CODELABS!!!
https://gbolly.github.io/gdgcodelab/
Thanks!
Any questions?
You can find me at
× @purple_heart_me
× gbolahan@ibadan.gdg.ng
Credits
Special thanks to all the people who made and
released these awesome resources for free:
× Presentation template by SlidesCarnival
× Photographs by Unsplash
× The Offline CookBook by Jack Archibald
× Offline First - Interactive Course by Jack
Archibald and Udacity

More Related Content

What's hot

Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web AppsBill Stavroulakis
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Abdelrahman Omran
 
Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web AppVinci Rufus
 
Progressive web apps with Angular 2
Progressive web apps with Angular 2Progressive web apps with Angular 2
Progressive web apps with Angular 2Manfred Steyer
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For StartupsIdo Green
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Zhentian Wan
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...Robert Nyman
 
Progressive Web Applications
Progressive Web ApplicationsProgressive Web Applications
Progressive Web ApplicationsBartek Igielski
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWAIdo Green
 
Offline-First Progressive Web Apps
Offline-First Progressive Web AppsOffline-First Progressive Web Apps
Offline-First Progressive Web AppsAditya Punjani
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web appsTimmy Kokke
 
Progressive Web App (feat. React, Django)
Progressive Web App (feat. React, Django)Progressive Web App (feat. React, Django)
Progressive Web App (feat. React, Django)Yurim Jin
 
Why Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessWhy Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessLets Grow Business
 

What's hot (20)

Progressive web app
Progressive web appProgressive web app
Progressive web app
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web Apps
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016
 
Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web App
 
Progressive web apps with Angular 2
Progressive web apps with Angular 2Progressive web apps with Angular 2
Progressive web apps with Angular 2
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For Startups
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)
 
Pwa.pptx
Pwa.pptxPwa.pptx
Pwa.pptx
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...
 
Progressive Web Applications
Progressive Web ApplicationsProgressive Web Applications
Progressive Web Applications
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWA
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Offline-First Progressive Web Apps
Offline-First Progressive Web AppsOffline-First Progressive Web Apps
Offline-First Progressive Web Apps
 
Progressive Web-App (PWA)
Progressive Web-App (PWA)Progressive Web-App (PWA)
Progressive Web-App (PWA)
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Progressive Web App (feat. React, Django)
Progressive Web App (feat. React, Django)Progressive Web App (feat. React, Django)
Progressive Web App (feat. React, Django)
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web App
 
Why Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessWhy Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your Business
 

Similar to GDG Ibadan #pwa

Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsGbolahan Alli
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...Robert Nyman
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulRobert Nyman
 
Building Offline Ready and Installable Web App
Building Offline Ready and Installable Web AppBuilding Offline Ready and Installable Web App
Building Offline Ready and Installable Web AppMuhammad Samu
 
Service workers are your best friends
Service workers are your best friendsService workers are your best friends
Service workers are your best friendsAntonio Peric-Mazar
 
The web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goThe web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goRobert Nyman
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsUnfold UI
 
A year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUA year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUAntonio Peric-Mazar
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101Muhammad Samu
 
Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011traactivity
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...IT Event
 
Twelve Factor App With Lagom
Twelve Factor App With LagomTwelve Factor App With Lagom
Twelve Factor App With LagomKnoldus Inc.
 
Basic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsBasic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsAnjaliTanpure1
 
IRJET-Garbage Monitoring and Management using Internet of things
IRJET-Garbage Monitoring and Management using Internet of thingsIRJET-Garbage Monitoring and Management using Internet of things
IRJET-Garbage Monitoring and Management using Internet of thingsIRJET Journal
 

Similar to GDG Ibadan #pwa (20)

Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - Istanbul
 
Service workers
Service workersService workers
Service workers
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Building Offline Ready and Installable Web App
Building Offline Ready and Installable Web AppBuilding Offline Ready and Installable Web App
Building Offline Ready and Installable Web App
 
Service workers are your best friends
Service workers are your best friendsService workers are your best friends
Service workers are your best friends
 
The web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must goThe web - What it has, what it lacks and where it must go
The web - What it has, what it lacks and where it must go
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
 
A year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMUA year with progressive web apps! #DevConMU
A year with progressive web apps! #DevConMU
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101
 
Service worker API
Service worker APIService worker API
Service worker API
 
Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011
 
pwa-170717082930.pdf
pwa-170717082930.pdfpwa-170717082930.pdf
pwa-170717082930.pdf
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
Twelve Factor App With Lagom
Twelve Factor App With LagomTwelve Factor App With Lagom
Twelve Factor App With Lagom
 
Basic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsBasic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web Apps
 
IRJET-Garbage Monitoring and Management using Internet of things
IRJET-Garbage Monitoring and Management using Internet of thingsIRJET-Garbage Monitoring and Management using Internet of things
IRJET-Garbage Monitoring and Management using Internet of things
 

Recently uploaded

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

GDG Ibadan #pwa

  • 1. Progressive Web Apps Dev Summit Gbolahan Alli July 23rd , 2016
  • 2. ● Service Worker ● Caching Strategies ● App Shell ● Manifest Files ● Codelabs Agenda
  • 3. What is a Progressive Web App ? Experiences that combine the best of web with the best of app and becomes useful to users from the very first visit in a tab. No Install Required
  • 4. Key Characteristics of PWA ●Progressive - Works for every user regardless of browser and users ●Responsive - Fits any form factor; desktop,mobile,tablet etc ●Connectivity Independent - Enhanced with Service Workers to Work Offline or on Lie- Fi.
  • 5. Key Characteristics of PWA - cont’d ●App Like - Feels like an app to the user because it’s built on the app-shell model ●Re-engageable - Makes re-engagement easy through features like push notifications. ●Installable - Allows user to ‘keep’ apps on their homescreen without the hassle of an app store.
  • 6. Key Characteristics of PWA - cont’d ●Fresh - Always up to date courtesy of service worker update process ●Safe - Served via HTTPS to prevent snooping and ensure content isn’t tampered with.
  • 7. Our Discussion - today ●Connectivity Independent ●App - like ●Installable
  • 8. Connectivity Independent What is a Service Worker ? A script run by the browser in the background, separate from a webpage, that opens the door to features which don’t need a web page or user interaction Read more : http://www.html5rocks.com/en/tutorials/service-worker/introduction/
  • 9. Service Workers Things to note × Can’t access the DOM directly. Only way to communicate with pages is through postMessage. × Service worker can “hijack” network requests, giving you the developer absolute control. × Terminated when idle. Restarted needed. × Persist data using IndexedDb or something similar1 × Service workers make extensive use of promises2 Read more : http://www.html5rocks.com/en/tutorials/service-worker/introduction/ , http://www.html5rocks.com/tutorials/es6/promises/
  • 10. Service Workers - LifeCycle
  • 11. Service Workers - Registering ( function() { 'use strict'; if (navigator.serviceWorker) { //Registration Logic goes here } })();
  • 12. Service Workers - Events self.addEventListener(‘install’, function(reg) { // LOGIC GOES HERE }) self.addEventListener(‘activate’, function(event) { //LOGIC GOES HERE }) self.addEventListener(‘fetch’, function(event) {//LOGIC GOES HERE }) self.addEventListener(‘message’, function(event) { //LOGIC GOES HERE })
  • 13. Installable - Manifest.json ● User can Add App to Homescreen ● Easy access to Web App from homescreen ● Add a Manifest.json file to your app’s directory Read more : https://www.w3.org/TR/2016/WD-appmanifest-20160331/
  • 14. Installable - Manifest.json { "short_name": "", "name": "", "icons": [ { "src":"", "sizes": "", "type": "" } ], "start_url": "", "background_color": "", "theme_color": "", "display": "" } Read more : https://www.w3.org/TR/2016/WD-appmanifest-20160331/
  • 15. Caching Strategies - Responding to request Read More : https://jakearchibald.com/2014/offline-cookbook/ https://jakearchibald.com/2016/caching-best-practices/ ● Cache Only ● Network Only ● Cache, falling back to Network ● Cache & Network Race ● Network, falling back to Cache ● Cache then network
  • 17. Thanks! Any questions? You can find me at × @purple_heart_me × gbolahan@ibadan.gdg.ng
  • 18. Credits Special thanks to all the people who made and released these awesome resources for free: × Presentation template by SlidesCarnival × Photographs by Unsplash × The Offline CookBook by Jack Archibald × Offline First - Interactive Course by Jack Archibald and Udacity