O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Progressive Web Apps (PWA) - The Complete Guide

Video Description

Build a Progressive Web App (PWA) that feels like an iOS & Android App, using Device Camera, Push Notifications, and more

About This Video

  • Detailed explanation about what a PWA exactly is
  • How to use an app manifest to make your web app installable on device homescreens
  • Using service workers to offer offline support by caching assets
  • Advanced service worker usage and caching strategies
  • A refresher on Promises and the Fetch API as both concepts are heavily used in PWAs
  • How to improve user engagement by adding push notifications
  • A way to synchronize data in the background, even if connection is lost
  • How to access native device features like the camera or geolocation
  • Using Workbox to make service worker management easier
  • Explanations on how to turn your next SPA project into a PWA

In Detail

Progressive Web Apps (PWA) are the next big thing in web development as they bring mobile-app-like experiences to your users without requiring them to install an app from the App store/ Play store.You still create a web application (HTML, CSS, JavaScript) but this course will teach you how to add features such as camera access, service workers for offline support, push notifications, and more. This combines the best of both worlds: You deliver fast, engaging and reliable experiences whilst still having the reach and accessibility of a web page. "Progressive Web App" is simply a term that summarizes all the features that allow you to deliver mobile-like experiences. The topic is highly trending and it also is a topic which is here to stay! Not only is it strongly promoted by Google (actually a lot of talks at Google I/O 2017, Google's developer conference, were devoted to PWAs), it's also quickly being adopted by big companies like Twitter or the Washington Post. Having the skills to build and optimize these kind of web apps is already an important and highly demanded skill for modern web developers, a trend which is only going to accelerate! Therefore, learning how to build PWAs will give you a competitive edge! To ensure that you can apply the knowledge to ANY of your projects, the course project doesn't assume any JavaScript framework but focuses on the core features mentioned above!

Table of Contents

  1. Chapter 1 : Getting Started
    1. About this Course 00:02:07
    2. What are Progressive Web Apps? 00:03:24
    3. PWAs vs Native Mobile Apps 00:06:07
    4. A Demo PWA & What We'll Build in this Course 00:06:24
    5. Our First Progressive Web App 00:06:28
    6. PWA Core Building Blocks 00:03:20
    7. Comparing PWAs and SPAs 00:03:18
    8. What is "Progressive Enhancement" 00:03:23
    9. Course Outline 00:04:24
    10. Course Project Setup 00:06:10
    11. How to get the Most out of this Course 00:02:11
  2. Chapter 2 : Understanding the App Manifest
    1. Module Introduction 00:01:02
    2. Using an App Manifest to Make your App Installable 00:01:36
    3. Adding the Manifest 00:03:41
    4. Understanding App Manifest Properties 00:09:43
    5. Adding Properties to the App Manifest 00:09:44
    6. PWAs and Browser Support 00:02:17
    7. Using the Chrome Developer Tools 00:01:36
    8. Simulating the Web App on an Emulator 00:04:37
    9. Installing the Web App – Prerequisites 00:02:30
    10. Adding Properties for Safari 00:05:51
    11. Adding Properties for the Internet Explorer 00:02:31
    12. Wrap Up 00:00:28
  3. Chapter 3 : The Service Workers
    1. Module Introduction 00:00:41
    2. Why Service Workers Are Amazing! 00:04:41
    3. Understanding Service Worker Events 00:06:19
    4. The Service Worker Lifecycle 00:05:20
    5. Service Worker Browser Support 00:01:24
    6. Registering a Service Worker 00:09:26
    7. Reacting to Incoming Events (in SW) 00:05:40
    8. Updating & Activating Service Workers 00:03:00
    9. Non-Lifecycle Events 00:04:50
    10. Getting that "App Install Banner" 00:02:40
    11. Testing the App on Real Device (and Installing the App!) 00:03:43
    12. Deferring the App Install Banner 00:06:43
    13. Wrap Up 00:01:21
  4. Chapter 4 : Promise and Fetch
    1. Module Introduction 00:00:49
    2. Async Code in JavaScript 00:03:55
    3. Promises – Basics 00:04:40
    4. Rejecting Promises 00:04:06
    5. Where we Use Promises in our Project 00:02:26
    6. Fetch – Basics 00:06:12
    7. Sending Post Requests via Fetch 00:04:23
    8. Fetch and CORS 00:03:12
    9. Comparing Fetch and Ajax 00:03:04
    10. Adding Polyfills (for Legacy Browser Support) 00:03:30
    11. Fetch & Service Workers 00:02:06
    12. Wrap Up 00:00:56
  5. Chapter 5 : Service Workers – Caching
    1. Module Introduction 00:00:44
    2. Why Caching? 00:03:06
    3. Understanding the Cache API 00:04:00
    4. Browser Support 00:01:50
    5. Adjusting the Course Project 00:02:53
    6. Identifying (Pre-) Cacheable Items 00:03:07
    7. Static Caching/ Precaching 00:11:05
    8. Retrieving Items from the Cache 00:04:56
    9. Adding & Retrieving Multiple Files (to/ from Cache) 00:03:06
    10. Cache Multiple Files with addAll 00:09:11
    11. Dynamic Caching - The Basics 00:01:54
    12. Implementing Dynamic Caching 00:07:19
    13. Handling Errors 00:02:14
    14. Adding Cache Versioning 00:06:56
    15. Different Cache Versions & Cleanup 00:06:37
    16. Optimizing Cache Management 00:02:42
    17. Wrap Up 00:00:35
  6. Chapter 6 : Service Workers - Advanced Caching
    1. Module Introduction 00:01:12
    2. Module Preparation: Adding a Button 00:04:04
    3. Offering "Cache on Demand" 00:06:51
    4. Providing an Offline Fallback Page 00:06:21
    5. Strategy: Cache with Network Fallback 00:01:44
    6. Strategy: Cache Only 00:03:07
    7. Strategy: Network Only 00:01:58
    8. Strategy: Network with Cache Fallback 00:06:22
    9. Strategy: Cache then Network 00:09:05
    10. Cache then Network & Dynamic Caching 00:05:11
    11. Cache then Network with Offline Support 00:05:59
    12. Cache Strategies & "Routing" 00:03:10
    13. Applying Cache Only 00:05:46
    14. A Better Way of Parsing Static Cache URLs 00:02:40
    15. A Better Way of Serving Fallback Files 00:02:58
    16. Post Request and Cache API 00:03:18
    17. Cleaning/ Trimming the Cache 00:06:07
    18. Getting Rid of a Service Worker 00:03:49
    19. Preparing the Project for the Next Steps 00:00:29
    20. Wrap Up 00:00:57
  7. Chapter 7 : IndexedDB and Dynamic Data
    1. Module Introduction 00:01:01
    2. Understanding the Basics 00:01:12
    3. Setting up Firebase 00:07:19
    4. Connecting Frontend to Backend 00:08:32
    5. Dynamic Caching vs. Caching Dynamic Content 00:04:51
    6. Introducing IndexedDB 00:03:35
    7. IndexedDB Browser Support 00:00:39
    8. Adding the IDB File 00:02:31
    9. Storing Fetched Posts in IndexedDB 00:13:12
    10. Using IndexedDB in the Service Worker 00:03:57
    11. Reading Data from IDB 00:06:40
    12. Clearing IDB & Handling Server-Client Mismatch 00:03:41
    13. Implementing the Clear Database Method 00:03:58
    14. Deleting Single Items from the Database 00:04:06
    15. IndexedDB and Caching Strategies 00:01:34
    16. Wrap Up 00:00:46
  8. Chapter 8 : Creating a Responsive User Interface (UI)
    1. Module Introduction 00:01:19
    2. Responsive Design in this Course 00:02:52
    3. Understanding Responsive Design in our Project 00:03:30
    4. CSS and Media Queries 00:09:46
    5. Using Images in a Responsive Way 00:08:52
    6. Adding Animations 00:08:30
    7. The Viewport & Scaling 00:01:47
    8. Wrap Up 00:00:46
  9. Chapter 9 : Background Sync
    1. Module Introduction 00:01:04
    2. How does Background Sync Work? 00:03:34
    3. Adding the Basic Setup to our Project 00:04:04
    4. Registering a Synchronization Task 00:04:37
    5. Storing our Post in IndexedDB 00:06:01
    6. Adding a Fallback 00:04:12
    7. Syncing Data in the Service Worker 00:15:53
    8. Understanding Periodic Sync 00:02:16
    9. Adding Server Side Code 00:15:11
    10. Fixing Errors 00:05:21
    11. Wrap Up 00:00:49
  10. Chapter 10 : Web Push Notifications
    1. Module Introduction 00:01:04
    2. Why we need Web Push Notifications 00:01:56
    3. How Push & Notifications Work 00:09:05
    4. Displaying Notifications - Some Theory First 00:01:52
    5. Browser Support 00:02:02
    6. Requesting Permissions 00:08:07
    7. Displaying Notifications 00:03:38
    8. Notifications from Within the Service Worker 00:03:33
    9. Understanding Notifications' Options 00:08:49
    10. Advanced Options 00:02:58
    11. Adding Actions to Notifications 00:02:23
    12. Reacting to Notification Interaction – Clicks 00:05:22
    13. Reacting to Notification Interaction – Closing 00:02:37
    14. From Notifications to Push Messages 00:06:36
    15. Creating a Push Subscription 00:04:32
    16. Storing Subscriptions 00:10:51
    17. Connecting Server & Client (PWA) 00:01:45
    18. Sending Push Messages from the Server 00:09:56
    19. Listening to Push Messages 00:07:39
    20. Displaying Push Notifications on a Real Device 00:02:04
    21. Opening a Page upon User Interaction 00:05:45
    22. Improving our Code 00:04:28
    23. Wrap Up 00:01:16
  11. Chapter 11 : Native Device Features
    1. Module Introduction 00:00:56
    2. Preparing the Project 00:07:29
    3. Getting DOM Access 00:04:36
    4. Creating our own Polyfills 00:08:04
    5. Getting the Video Image 00:07:25
    6. Hooking Up the Capture Button 00:06:25
    7. Storing the Image on a Server 00:08:40
    8. Accepting File Upload Example with Firebase 00:14:36
    9. Testing the Camera & Upload 00:04:51
    10. Implementing a Fallback 00:02:31
    11. Getting the User Position 00:16:39
    12. Fixing Bugs 00:08:46
    13. Testing the App on a Real Device 00:01:44
    14. Wrap Up 00:00:47
  12. Chapter 12 : Service Worker Management with Workbox
    1. Module Introduction 00:01:01
    2. Understanding the Basics 00:00:56
    3. Installing Workbox & Using It 00:06:57
    4. Configuring Workbox Precaching 00:05:03
    5. Customizing the Service Worker 00:04:45
    6. Implementing Routing with the Workbox Router 00:06:41
    7. Expanding Dynamic Caching 00:03:31
    8. Options and Setting up Strategies 00:06:09
    9. Custom Handlers (Example: For IndexedDB) 00:03:46
    10. Providing an Offline HTML Fallback 00:06:47
    11. Handling Background Synchronization and Push Notifications 00:03:26
    12. Understanding the Workbox Documentation 00:05:18
    13. Enhancing the Build Workflow 00:06:31
    14. Running our App on a Real Server 00:03:56
    15. Auditing our Webpage with Lighthouse 00:04:25
    16. Wrap Up 00:01:11
  13. Chapter 13 : SPAs and PWAs
    1. Module Introduction 00:01:18
    2. React with create-react-app 00:09:30
    3. A General Note about SPAs and PWAs 00:01:29
    4. Angular with the CLI 00:16:35
    5. Vue with Vue CLI 00:06:49
    6. Wrap Up 00:01:00
  14. Chapter 14 : Course Roundup
    1. Course Roundup 00:03:21