Your First Progressive Web App

Open West 2018

Demo App


Getting Started

Reliable

Secure

Fast

Engaging

Courses 📚

PWA Support


Technologies

Push Notifications

Two API’s

Push API

The Push API gives web applications the ability to receive messages pushed to them from a server, whether or not the web app is in the foreground, or even currently loaded.

Notification API

The Notifications API allows web pages to control the display of system notifications to the end user.

App Shell

🎥Instant Loading with the App Shell Model

The app shell should ideally:

Reliable performance that is consistently fast. Repeat visits are extremely quick. Static assets and the UI (e.g. HTML, JavaScript, images and CSS) are cached on the first visit so that they load instantly on repeat visits. Content may be cached on the first visit, but is typically loaded when it is needed.

Native-like interactions. By adopting the app shell model, you can create experiences with instant, native-application-like navigation and interactions.

Economical use of data. Design for minimal data usage and be judicious in what you cache because listing files that are non-essential (large images that are not shown on every page, for instance) result in browsers downloading more data than is strictly necessary. Even though data is relatively cheap in western countries, this is not the case in emerging markets where connectivity is expensive and data is costly.

Service Worker

The service worker is like a shared worker, but whereas pages control a shared worker, a service worker controls pages.

Being able to run JavaScript before a page exists opens up many possibilities, and the first feature we’re adding is interception and modification of navigation and resource requests. This lets you tweak the serving of content, all the way up to treating network-connectivity as an enhancement. It’s like having a proxy server running on the client.

Web App Manifest

The web app manifest is a simple JSON file that tells the browser about your web application and how it should behave when ‘installed’ on the users mobile device or desktop. Having a manifest is required by Chrome to show the Add to Home Screen prompt.

Safari

Safari still does not quite have full support for configuring PWA to act like native apps.


Browser API’s


Developer Tools

Lighthouse Logo

Lighthouse

Lighthouse is an open-source tool from Google that audits a web app for PWA features

Lighthouse example report


Resources

Offline

Animations

Push Notifications

Performance

Helpful Libraries


Frameworks

🎥Production PWA with Frameworks

React

React PWA Starter Kit

create-react-app my-great-app

What is Included

Preact

Preact PWA Starter Kit

preact create my-great-app

What is Included

Polymer

Polymer PWA Starter Kit

Demo

🎥Google I/O Video

What is Included

Vue.js

PWA Starter Template

vue init pwa my-project

What is Included

Angular

Service Worker Support

ng add @angular/pwa --project *project-name*

Angular Service Worker Intro