SlideShare a Scribd company logo
INCREASING ACCESS THROUGH SERVICE
WORKERS
NECOLINE HUBNER
NECOLINE
HUBNER
SOFTWARE ENGINEER
RISE
Photo credit: Lutheran World Federation
CONSIDERATIONS
▸ Performance
▸ Battery usage
▸ Responsive design
▸ Offline capabilities
ARE SERVICE WORKERS
RIGHT FOR YOU?
UNDERSTAND THE USER BASE
▸ Users in infrastructure low environments require offline access
▸ However…
▸ Devices used may dictate the ability to access service workers
LET’S TALK ABOUT
PROGRESSIVE ENHANCEMENTS
DEVELOPMENT APPROACH,
NOT A TECHNOLOGY CHOICE
PROGRESSIVE ENHANCEMENTS:
A DEVELOPMENT APPROACH
PROGRESSIVE ENHANCEMENT
Baseline of Support
Core Functionality
PROGRESSIVE ENHANCEMENT
ITERATION AND IMPROVEMENT
pre-fetched content
push notifications
BUILDING FOR ALL OF YOUR USERS
PROGRESSIVE ENHANCEMENT
SERVICE WORKERS
APPCACHE
▸ Declarative API
▸ Ability to cache specified assets
▸ Assumptive and brittle
SERVICE WORKERS
MUCH MORE THAN JUST OFFLINE
▸ Push Notifications
▸ Background syncs
▸ Local downloads
▸ Load balancer
▸ Create a virtual server
▸ Conduct API Analytics
PARSING & REGISTRATION
The browser meets the requirements
Service worker is not registered
The service worker has changed (bytes)
LIFE CYCLE OF A SERVICE WORKER
INSTALLING
LIFE CYCLE OF A SERVICE WORKER
Carefully cache your assets
INSTALLED / WAITING
Only one service worker should run at
a time
Not recommended to force activation
LIFE CYCLE OF A SERVICE WORKER
ACTIVATING
No current Service Worker
self.skipWaiting() was called
LIFE CYCLE OF A SERVICE WORKER
User navigation
Service Worker timed-out
ACTIVATED
Service worker can now
control the client
LIFE CYCLE OF A SERVICE WORKER
REDUNDANCY
Installing event failed
Activating event failed
A new Service Worker replaces it
LIFE CYCLE OF A SERVICE WORKER
FULL CYCLE
LIFE CYCLE OF A SERVICE WORKER
GET INTO THE BROWSER
Set default (update on reload)
Inspect service worker
BEGINNER TIPS
Error handling
Debugging
LEARN TO LOVE A GOOD PROMISE
And if you can, upgrade to async/await
BEGINNER TIPS
Helps with clean code
Error handling
Conditionals
Much more
DON’T GET STUCK ON THE SAME SCREEN
Develop a cache invalidation strategy
BEGINNER TIPS
Add feature flag to control unregistration
Have a no-op Service Worker at the ready
Force Update for version control
GET A HELPING HAND
▸ Service worker generator tools
▸ Workbox
▸ sw-precache + sw-toolbox
▸ generate-service-worker
BEGINNER TIPS
▸ Cookbooks
▸ Jake Archibald’s Offline Cookbook
▸ Mozilla’s Service Worker Cookbook
OFF(LINE) WE GO!
Necoline Hubner
@neco-rising@necolinehubner
We accept donations
and will soon accept open source contributions
RESOURCES
▸ Progressive Enhancements
▸ MDN
▸ Lifecycle
▸ Cache Management
▸ Workbox
▸ Workbox with Webpack
▸ Browser Compatibility
▸ Offline Cookbook
▸ Mozilla Cookbook

More Related Content

What's hot

DERP: Free Rosas
DERP: Free RosasDERP: Free Rosas
DERP: Free Rosas
Free Rosas
 

What's hot (18)

Dev ops: Continuous delivery and Windows Azure
Dev ops: Continuous delivery and Windows AzureDev ops: Continuous delivery and Windows Azure
Dev ops: Continuous delivery and Windows Azure
 
Microservices Architecture: Nirvana or Nightmare
Microservices Architecture: Nirvana or NightmareMicroservices Architecture: Nirvana or Nightmare
Microservices Architecture: Nirvana or Nightmare
 
Safe deployments with Blue-Green and Spinnaker
Safe deployments with Blue-Green and SpinnakerSafe deployments with Blue-Green and Spinnaker
Safe deployments with Blue-Green and Spinnaker
 
Tfs 2015 Upgrade Tips and Tricks
Tfs 2015 Upgrade Tips and TricksTfs 2015 Upgrade Tips and Tricks
Tfs 2015 Upgrade Tips and Tricks
 
Aws, play! couch db scaling soa in the cloud
Aws, play! couch db  scaling soa in the cloudAws, play! couch db  scaling soa in the cloud
Aws, play! couch db scaling soa in the cloud
 
Scaling Without Expanding: a DevOps Story
Scaling Without Expanding: a DevOps StoryScaling Without Expanding: a DevOps Story
Scaling Without Expanding: a DevOps Story
 
A peek at (one) Modern Infrastructure Development Environment
A peek at (one) Modern Infrastructure Development EnvironmentA peek at (one) Modern Infrastructure Development Environment
A peek at (one) Modern Infrastructure Development Environment
 
Devops e a nova cultura - TDC Florianopolis 2015
Devops e a nova cultura - TDC Florianopolis 2015Devops e a nova cultura - TDC Florianopolis 2015
Devops e a nova cultura - TDC Florianopolis 2015
 
Demystifying Web Performance
Demystifying Web PerformanceDemystifying Web Performance
Demystifying Web Performance
 
DERP: Free Rosas
DERP: Free RosasDERP: Free Rosas
DERP: Free Rosas
 
Jeffrey Snover - Empowering DevOps with Azure Stack
Jeffrey Snover - Empowering DevOps with Azure StackJeffrey Snover - Empowering DevOps with Azure Stack
Jeffrey Snover - Empowering DevOps with Azure Stack
 
Learning chef
Learning chefLearning chef
Learning chef
 
You only have to change on thing to do the DevOps, everything
You only have to change on thing to do the DevOps, everythingYou only have to change on thing to do the DevOps, everything
You only have to change on thing to do the DevOps, everything
 
Building a loosely coupled toolchain with Rundeck and Puppet
Building a loosely coupled toolchain with Rundeck and PuppetBuilding a loosely coupled toolchain with Rundeck and Puppet
Building a loosely coupled toolchain with Rundeck and Puppet
 
Developer day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast DeploymentsDeveloper day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast Deployments
 
Mind the Gap: Crossing the DevOps Chasm
Mind the Gap: Crossing the DevOps ChasmMind the Gap: Crossing the DevOps Chasm
Mind the Gap: Crossing the DevOps Chasm
 
Accelerating DevOps Collaboration with Sauce Labs and JIRA
Accelerating DevOps Collaboration with Sauce Labs and JIRAAccelerating DevOps Collaboration with Sauce Labs and JIRA
Accelerating DevOps Collaboration with Sauce Labs and JIRA
 
Kenzan Spinnaker Meetup
Kenzan Spinnaker MeetupKenzan Spinnaker Meetup
Kenzan Spinnaker Meetup
 

Similar to Increasing Access Through Service Workers

E g innovations
E g innovationsE g innovations
E g innovations
dvmug1
 

Similar to Increasing Access Through Service Workers (20)

Offline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and ReactOffline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and React
 
Angular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJSAngular Offline Progressive Web Apps With NodeJS
Angular Offline Progressive Web Apps With NodeJS
 
Best of re:Invent 2016 meetup presentation
Best of re:Invent 2016 meetup presentationBest of re:Invent 2016 meetup presentation
Best of re:Invent 2016 meetup presentation
 
Success Factors for a Mature Microservices Implementation
Success Factors for a Mature Microservices ImplementationSuccess Factors for a Mature Microservices Implementation
Success Factors for a Mature Microservices Implementation
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
 
You only have to change one thing to make DevOps work, Everything
You only have to change one thing to make DevOps work, EverythingYou only have to change one thing to make DevOps work, Everything
You only have to change one thing to make DevOps work, Everything
 
DevOps Transformation: Learnings and Best Practices
DevOps Transformation: Learnings and Best PracticesDevOps Transformation: Learnings and Best Practices
DevOps Transformation: Learnings and Best Practices
 
DevOps Pipeline for Liferay Application
DevOps Pipeline for Liferay ApplicationDevOps Pipeline for Liferay Application
DevOps Pipeline for Liferay Application
 
Progressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web TechnologiesProgressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web Technologies
 
Way to cloud
Way to cloudWay to cloud
Way to cloud
 
What are the Cool Kids Doing With Continuous Delivery?
What are the Cool Kids Doing With Continuous Delivery?What are the Cool Kids Doing With Continuous Delivery?
What are the Cool Kids Doing With Continuous Delivery?
 
Full stack development best practice and toolset
Full stack development best practice and toolsetFull stack development best practice and toolset
Full stack development best practice and toolset
 
Testing in the new age of DevOps
Testing in the new age of DevOpsTesting in the new age of DevOps
Testing in the new age of DevOps
 
Global DevOps BootCamp
Global DevOps BootCampGlobal DevOps BootCamp
Global DevOps BootCamp
 
Why Startups Are Still On AWS
Why Startups Are Still On AWSWhy Startups Are Still On AWS
Why Startups Are Still On AWS
 
Ansible for Enterprise
Ansible for EnterpriseAnsible for Enterprise
Ansible for Enterprise
 
Consul: Service-oriented at Scale
Consul: Service-oriented at ScaleConsul: Service-oriented at Scale
Consul: Service-oriented at Scale
 
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
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
E g innovations
E g innovationsE g innovations
E g innovations
 

Recently uploaded

Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
Kamal Acharya
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
AbrahamGadissa
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
Atif Razi
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdf
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
Furniture showroom management system project.pdf
Furniture showroom management system project.pdfFurniture showroom management system project.pdf
Furniture showroom management system project.pdf
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and ClusteringKIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projection
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 

Increasing Access Through Service Workers