An Intro to Service, Promise API & Fetch API
Service Workers are the cornerstone of a Progressive Web App. They are the key component that binds all other PWA APIs together and enable the support of native-like capabilities. This course explores their potential and examines the Promise and Fetch APIs.
4 days - $2,100.00
Course taught by an expert PWA Developer.
Prerequisites:
Advanced knowledge of computer coding is essential.
Course Outline
What is a Service Worker?
Application Download, Installation and Versioning in a Nutshell
Service Worker Registration
Service Worker Hello World Install Phase
The Cache Storage API
Background Application Download
The Service Worker Lifecycle (Consistency by Default)
Service Worker Activation Phase
Intercepting HTTP Requests
Purging Previous Application versions
Serving the Application From Cache Using a Cache Then Network Strategy
Customizing the Service Worker Lifecycle
Taking over the current page with clients.claim()
Skipping the Wait Phase (and potential issues it might cause)
Updating a Service Worker Manually
Built-in Browser protection against broken Service Workers
Precautions with the use of the Browser Cache and Service Workers
Conclusions
Creating Promises
Promises syntax and scope.
Simplifying common, useful methods with Promises.
Basic error handling.
Chaining Promises
Creating sequences of async work manually.
Advanced error handling.
Techniques for generating sequences of async work with array methods
Fetch APIs
Pass through a URL to get a response
Analyze a JSON response
Parse JSON with the .json() method
Extract a specific piece of data from the response
Use the Fetch API in conjunction with a higher order function