Slide 1

Slide 1 text

PWA BEYOND THEORY How to create your progressive web app

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

13% 87% Mobile web Apps Source: comScore Mobile Metrix, U.S., Age 18+, June 2015

Slide 4

Slide 4 text

80% of time is spent on 3 apps Source: comScore Mobile Metrix, U.S., Age 18+, June 2015

Slide 5

Slide 5 text

ZERO number of apps the average user installs per month Source: comScore Mobile Metrix, U.S., Age 18+, June 2015

Slide 6

Slide 6 text

New web features ● Push Messages ● Offline storage ● Audio & Video Capture ● Recording Media ● Geolocation ● Web Bluetooth API ● More: https://whatwebcando.today

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

WHAT IS A PWA? it's a website that behaves like an app

Slide 9

Slide 9 text

WHAT IS A PWA? new level of caring about the quality of your end-to-end user experience

Slide 10

Slide 10 text

Starbucks https://app.starbucks.com

Slide 11

Slide 11 text

The Washington Post https://www.washingtonpost.com/pwa

Slide 12

Slide 12 text

Twitter https://mobile.twitter.com

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

PWA aspects ● Site works cross-browser ● Pages are responsive on tablets & mobile devices ● First load fast even on 3G ● All app URLs load while offline ● Metadata provided for Add to Home screen ● Site is served over HTTPS

Slide 15

Slide 15 text

✓ site works cross-browser

Slide 16

Slide 16 text

✓ responsive ✓ first load fast

Slide 17

Slide 17 text

✓ all app URLs load while offline

Slide 18

Slide 18 text

SERVICE WORKER advanced offline experiences

Slide 19

Slide 19 text

Web server

Slide 20

Slide 20 text

Service worker Client side proxy (wrote in JavaScript) Cache Web server

Slide 21

Slide 21 text

SERVICE WORKER it's for the SECOND loading

Slide 22

Slide 22 text

implementing a Service Worker

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

registering a Service Worker

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

adding install event

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

preload resources

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

activate event

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

almost finishing

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

controlling the loading

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

cache strategy network, otherwise use the cache

Slide 39

Slide 39 text

the offline cookbook by Jake Archibald https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/

Slide 40

Slide 40 text

✓ add to home screen

Slide 41

Slide 41 text

{ "name": "Currency Converter", "short_name": "CConverter", "icons": [{ "src": "icon-48x48.png", "sizes": "48x48", "type": "image/png" }, {...}], "start_url": "/index.html", "display": "standalone", "orientation": "portrait", "background_color": "#06f8c5", "theme_color": "#06f8c5" }

Slide 42

Slide 42 text

manifest.json { "name": "Currency Converter", "short_name": "CConverter", "icons": [{ "src": "icon-48x48.png", "sizes": "48x48", "type": "image/png" }, {...}], "start_url": "/index.html", "display": "standalone", "orientation": "portrait", "background_color": "#06f8c5", "theme_color": "#06f8c5" }

Slide 43

Slide 43 text

manifest.json { "name": "Currency Converter", "short_name": "CConverter", "icons": [{ "src": "icon-48x48.png", "sizes": "48x48", "type": "image/png" }, {...}], "start_url": "/index.html", "display": "standalone", "orientation": "portrait", "background_color": "#06f8c5", "theme_color": "#06f8c5" }

Slide 44

Slide 44 text

manifest.json { "name": "The Washington Post", "short_name": "Wash Post", "icons": [{ "src": "icon-48x48.png", "sizes": "48x48", "type": "image/png" }, {...}], "start_url": "/index.html", "display": "standalone", "orientation": "portrait", "background_color": "#06f8c5", "theme_color": "#06f8c5" }

Slide 45

Slide 45 text

manifest.json { "name": "Currency Converter", "short_name": "CConverter", "icons": [{ "src": "icon-48x48.png", "sizes": "48x48", "type": "image/png" }, {...}], "start_url": "/index.html", "display": "standalone", "orientation": "portrait", "background_color": "#06f8c5", "theme_color": "#06f8c5" }

Slide 46

Slide 46 text

✓ safe

Slide 47

Slide 47 text

keeping users safe is hugely important ● Reliability: Is this the site that the user expects? ● Integrity: Has anyone changed this content? ● Privacy: Can anyone monitor my navigation?

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Let’s Encrypt is a trademark of the Internet Security Research Group.

Slide 51

Slide 51 text

that's all :D

Slide 52

Slide 52 text

last considerations ● Storage is not required ● Easy to share (conversion flow) ● Always updated ● Lower costs compared to native app development.

Slide 53

Slide 53 text

Lighthouse

Slide 54

Slide 54 text

use your creativity ● https://developers.google.com/web/progressive-web-apps/checklist ● https://whatwebcando.today

Slide 55

Slide 55 text

try it: http://bit.ly/pwacconverter

Slide 56

Slide 56 text

the code is available on github: https://github.com/amandavilela/currencyconverter

Slide 57

Slide 57 text

Obrigada! Amanda Vilela amandavilela.com