61
DEMYSTIFYING PROGRESSIVE WEB APPS @MARCUSHELLBERG

Demystifying progressive web apps

Embed Size (px)

Citation preview

Page 1: Demystifying progressive web apps

D E M Y S T I F Y I N G P R O G R E S S I V E W E B A P P S

! @ M A R C U S H E L L B E R G

5

S T O R Y A N D P H I L O S O P H Y

Software is eating the world and what most of us see of it is the user interface. The user

interface has become the key component of how the users experience the business

behind it. Competition is lost or won due to user experience. Simplicity is king and the

users get frustrated by anything ugly, slow or not working on the device they happen to

use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight.

Together we want to build a user interface that puts a smile on the user’s face.

Vaadin is the technology that empowers developers to build the best web-apps for

business purposes. Our priority over everything else is developer productivity because

we believe that by simplifying the developer experience and saving the developer’s

time, they are best able to focus on building great user interfaces.

Our brand is what we want everyone to think about us. When everyone - both us and

the people around us - have a consistent understanding of what Vaadin is and what we

stand for, it enables that image to spread and amplify. This book defines what we want

that image to be. It defines what the Vaadin brand is.

I hope that You are as excited and proud of living and breathing the Vaadin brand as

I am. You are the one who is shaping what everyone thinks about Vaadin - using this

brand as a tool and a guideline every day.

Let’s fight for simplicity for both the users and the developers!

Joonas Lehtinen

Founder & CEO

Vaadin

I N T R O D U C T I O N

Page 2: Demystifying progressive web apps
Page 3: Demystifying progressive web apps

A P P I N S TA L L S / M O N T H :

0

Page 4: Demystifying progressive web apps

While we haven’t yet reached ‘Peak App’ the market

is definitely tightening, and app publishers need to rethink how to break through to the consumer’s screen.

comScore 2016 US Mobile App report

comscore.com/Insights/Presentations-and-Whitepapers/2016/The-2016-US-Mobile-App-Report

Page 5: Demystifying progressive web apps

Despite significant investment and hopes for positive ROI, mobile applications are not paying off for many brands.

Compelling alternatives such as progressive web apps mean the branded app economy is poised for change.

gartner.com/smarterwithgartner/gartner-predicts-2017-marketers-expect-the-unexpected

GARTNER: 20% WILL ABANDON THEIR MOBILE APPS BY 2019

Page 6: Demystifying progressive web apps

T H E P R O B L E M I S F R I C T I O N

Page 7: Demystifying progressive web apps

open the app store80find your app in the store64tap install51accept permission requests41find the app on their home screen33

26 will open the app

O U T O F 1 0 0 I N T E R E S T E D P E O P L E

Page 8: Demystifying progressive web apps
Page 9: Demystifying progressive web apps

tap install80accept permission requests64find the app on their home screen51

41will open the app

S T I L L , O N L Y . . .

Page 10: Demystifying progressive web apps

C O S T P E R I N S T A L L

$ 1 . 5 0 +

fiksu.com/resources/fiksu-indexes

Page 11: Demystifying progressive web apps

Users spend almost 90% of time in their top 5 apps.

Source: comScore 2016 report

Page 12: Demystifying progressive web apps

W H A T A B O U T M O B I L E W E B ?

Page 13: Demystifying progressive web apps
Page 14: Demystifying progressive web apps

80 will open the app

O U T O F 1 0 0 I N T E R E S T E D P E O P L E

Page 15: Demystifying progressive web apps

Source: comScore 2016 report

0

3

6

9

12

# Visitors (MM)0

50

100

150

200

Minutes

3x 20x

Native apps Mobile web

Top 1000 Mobile Apps vs. Top 1000 Mobile Web Properties

Page 16: Demystifying progressive web apps

H O W A B O U T H Y B R I D , T H E N ?

Page 17: Demystifying progressive web apps

WHAT'S HOLDING BACK THE MOBILE WEB?

Page 18: Demystifying progressive web apps

1 . B A D U S E R E X P E R I E N C E

Page 19: Demystifying progressive web apps
Page 20: Demystifying progressive web apps
Page 21: Demystifying progressive web apps

2 . P O O R R E - E N G A G E M E N T

Page 22: Demystifying progressive web apps
Page 23: Demystifying progressive web apps
Page 24: Demystifying progressive web apps

3 . P E R F O R M A N C E

Page 25: Demystifying progressive web apps

P R O G R E S S I V E W E B A P P S

Page 26: Demystifying progressive web apps

1. Reliable

2. Fast

3. Engaging

Page 27: Demystifying progressive web apps

T R Y B E F O R E Y O U B U Y

Page 28: Demystifying progressive web apps
Page 29: Demystifying progressive web apps

H O W D O Y O U B U I L D A P W A ?

Page 30: Demystifying progressive web apps

P W A C H E C K L I S T :

" Site is served over HTTPS

" Responsive layouts, works on mobile

" First load is fast even on 3G

" Site works cross-browser

" Page transitions don't feel like they block on network

" Each page has a URL

" Metadata is provided for Add to Home screen

developers.google.com/web/progressive-web-apps/checklist

Page 31: Demystifying progressive web apps

D O Y O U N E E D T O S T A R T F R O M S C R A T C H ?

N O .

Page 32: Demystifying progressive web apps

1 . A D D A N A P P M A N I F E S T

Page 33: Demystifying progressive web apps

{ "name": "Todo App", "icons": [{ "src": "todo.png", "sizes": "192x192", "type": "image/png" }], "start_url": "/index.html", "display": "standalone", "orientation": "portrait" }

https://developer.mozilla.org/en-US/docs/Web/Manifest

W E B A P P M A N I F E S T

Page 34: Demystifying progressive web apps

<head> ... <link rel="manifest" href="/manifest.webmanifest"> </head>

Page 35: Demystifying progressive web apps

2 . D E F I N E A S E R V I C E W O R K E R

Page 36: Demystifying progressive web apps

Service worker

#

S E R V I C E W O R K E R

Page 37: Demystifying progressive web apps

if ('serviceWorker' in navigator) { }

Page 38: Demystifying progressive web apps

if ('serviceWorker' in navigator) { window.addEventListener('load', () => { navigator.serviceWorker.register('/sw.js'); }); }

Page 39: Demystifying progressive web apps

let CACHE_NAME = 'cache-v1'; let urlsToCache = ['/', '/styles/main.css', '/script/main.js'];

/sw.js

Page 40: Demystifying progressive web apps

let CACHE_NAME = 'cache-v1'; let urlsToCache = ['/', '/styles/main.css', '/script/main.js'];

self.addEventListener('install', event => {

});

Page 41: Demystifying progressive web apps

let CACHE_NAME = 'cache-v1'; let urlsToCache = ['/', '/styles/main.css', '/script/main.js'];

self.addEventListener('install', event => { event.waitUntil( caches.open(CACHE_NAME)); });

Page 42: Demystifying progressive web apps

let CACHE_NAME = 'cache-v1'; let urlsToCache = ['/', '/styles/main.css', '/script/main.js'];

self.addEventListener('install', event => { event.waitUntil( caches.open(CACHE_NAME) .then(cache => cache.addAll(urlsToCache)); ); });

Page 43: Demystifying progressive web apps

self.addEventListener('fetch', event => {

});

Page 44: Demystifying progressive web apps

self.addEventListener('fetch', event => { event.respondWith( ); });

Page 45: Demystifying progressive web apps

self.addEventListener('fetch', event => { event.respondWith( caches.match(event.request) ); });

Page 46: Demystifying progressive web apps

self.addEventListener('fetch', event => { event.respondWith( caches.match(event.request) .then(response => {

if (response) { return response; } return fetch(event.request); } ) ); });

Page 47: Demystifying progressive web apps

github.com/GoogleChrome/sw-precache

github.com/GoogleChrome/sw-toolbox

toolbox.router.get('*.json', toolbox.cacheFirst);->

T O O L S

Page 48: Demystifying progressive web apps

3 . A D D P U S H , B A C K G R O U N D S Y N C

( I F Y O U W A N T T O )

Page 49: Demystifying progressive web apps

developers.google.com

😅

/web

/fundamentals

/getting-started

/codelabs

/push-notifications

Page 50: Demystifying progressive web apps

Lighthouse

Page 51: Demystifying progressive web apps

T H E B A D N E W S

Page 52: Demystifying progressive web apps

N O I O S S U P P O R T

(YET)

Page 53: Demystifying progressive web apps

T H E G O O D N E W S

Page 54: Demystifying progressive web apps

G R E A T A N D R O I D S U P P O R T

(88% MARKET SHARE)

Page 55: Demystifying progressive web apps

A N D D E S K T O P O F C O U R S E

Page 56: Demystifying progressive web apps

T H E Y A R E A P R O G R E S S I V E

E N H A N C E M E N T

Page 57: Demystifying progressive web apps

C A N B E U S E D W I T H A N Y F R A M E W O R K

P A R T O F T H E W E B P L A T F O R M

Page 58: Demystifying progressive web apps
Page 59: Demystifying progressive web apps
Page 60: Demystifying progressive web apps

Help developers build web apps that users ♡

Page 61: Demystifying progressive web apps

T H A N K Y O U !

! @ M A R C U S H E L L B E R G

5

S T O R Y A N D P H I L O S O P H Y

Software is eating the world and what most of us see of it is the user interface. The user

interface has become the key component of how the users experience the business

behind it. Competition is lost or won due to user experience. Simplicity is king and the

users get frustrated by anything ugly, slow or not working on the device they happen to

use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight.

Together we want to build a user interface that puts a smile on the user’s face.

Vaadin is the technology that empowers developers to build the best web-apps for

business purposes. Our priority over everything else is developer productivity because

we believe that by simplifying the developer experience and saving the developer’s

time, they are best able to focus on building great user interfaces.

Our brand is what we want everyone to think about us. When everyone - both us and

the people around us - have a consistent understanding of what Vaadin is and what we

stand for, it enables that image to spread and amplify. This book defines what we want

that image to be. It defines what the Vaadin brand is.

I hope that You are as excited and proud of living and breathing the Vaadin brand as

I am. You are the one who is shaping what everyone thinks about Vaadin - using this

brand as a tool and a guideline every day.

Let’s fight for simplicity for both the users and the developers!

Joonas Lehtinen

Founder & CEO

Vaadin

I N T R O D U C T I O N