The Progression of Web Apps

A presentation at GDG DevFest BE in October 2016 in Brussels, Belgium by Niels Leenheer

Slide 1

Slide 1

THE PROGRESSION OF WEB APPS GDG DEVFEST BELGIUM, 23RD OCTOBER 2016

Slide 2

Slide 2

THE PROGRESSION OF WEB APPS GDG DEVFEST BELGIUM, 23RD OCTOBER 2016

Slide 3

Slide 3

Slide 4

Slide 4

Slide 5

Slide 5

THE PROGRESSION OF WEB APPS

Slide 6

Slide 6

THE PROGRESSION OF WEB APPS

Slide 7

Slide 7

PROGRESSIVE WEB APPS

Slide 8

Slide 8

Photo by Daniel Appelquist

Slide 9

Slide 9

Slide 10

Slide 10

PROGRESSIVE

Slide 11

Slide 11

RESPONSIVE

Slide 12

Slide 12

CONNECTIVITY INDEPENDENT

Slide 13

Slide 13

APP-LIKE

Slide 14

Slide 14

FRESH

Slide 15

Slide 15

SAFE

Slide 16

Slide 16

DISCOVERABLE

Slide 17

Slide 17

RE-ENGAGEABLE

Slide 18

Slide 18

INSTALLABLE

Slide 19

Slide 19

LINKABLE

Slide 20

Slide 20

Slide 21

Slide 21

PROGRESSIVE

Slide 22

Slide 22

WEB APP

Slide 23

Slide 23

RESPONSIVE

Slide 24

Slide 24

airhorner.com

Slide 25

Slide 25

CONNECTIVITY INDEPENDENT

Slide 26

Slide 26

Slide 27

Slide 27

MENU Where is my navigation? Click on the hamburger menu to get access to all of the navigation options. APP-LIKE

Slide 28

Slide 28

APP-LIKE

Slide 29

Slide 29

FRESH

Slide 30

Slide 30

Slide 31

Slide 31

FRESH

Slide 32

Slide 32

SAFE

Slide 33

Slide 33

DISCOVERABLE

Slide 34

Slide 34

Hi there! I’m a Web App!

Slide 35

Slide 35

This is a testnot Something pushmessage very important on acceptation. has happened You have Battery is 4almost app updates empty, connect your charger available RE-ENGAGEABLE Someone you hardly know posted what he just ate

Slide 36

Slide 36

Slide 37

Slide 37

INSTALLABLE

Slide 38

Slide 38

airhorner.com The Airhorner × airhorner.com ADD TO HOMESCREEN

Slide 39

Slide 39

LINKABLE

Slide 40

Slide 40

Airhorner

Slide 41

Slide 41

Airhorner no results found

Slide 42

Slide 42

https://airhorner.com

Slide 43

Slide 43

Slide 44

Slide 44

Slide 45

Slide 45

THIS IS NOT A NEW IDEA

Slide 46

Slide 46

Slide 47

Slide 47

“ The full Safari engine is inside of iPhone. And so, you can write amazing Web 2.0 and Ajax apps that look exactly and behave exactly like apps on the iPhone. And these apps can integrate perfectly with iPhone services. — Steve Jobs, 2007

Slide 48

Slide 48

Slide 49

Slide 49

Slide 50

Slide 50

Slide 51

Slide 51

Slide 52

Slide 52

“ The fundamental problem on the iPhone is not Apple’s App Store approval policies, but the iPhone developers’ arrogant disdain for Web technologies. I reviewed the apps I have on my iPhone, and most can be released as a Web app right now. — Peter Paul Koch, 2009

Slide 53

Slide 53

“ The fundamental problem on the iPhone is not Apple’s App Store approval policies, but the iPhone developers’ arrogant disdain for Web technologies. I reviewed the apps I have on my iPhone, and most can be released as a Web app right now. — Peter Paul Koch, 2009

Slide 54

Slide 54

Slide 55

Slide 55

✓ PROGRESSIVE ✓ RESPONSIVE ✓ CONNECTIVITY INDEPENDENT ✓ APP-LIKE ✓ SAFE ✓ DISCOVERABLE ✓ INSTALLABLE ✓ LINKABLE

Slide 56

Slide 56

LOTS OF UGLY HACKS

Slide 57

Slide 57

LOTS OF BROWSER QUIRKS

Slide 58

Slide 58

NON-STANDARD API’S

Slide 59

Slide 59

NO DEVICE API’S

Slide 60

Slide 60

Slide 61

Slide 61

BUILDING NATIVE APPS USING WEB TECHNOLOGY

Slide 62

Slide 62

WHY?

Slide 63

Slide 63

WE KNOW HTML, CSS AND JAVASCRIPT

Slide 64

Slide 64

CROSS PLATFORM DEVELOPMENT

Slide 65

Slide 65

GET ACCESS TO NATIVE API’S

Slide 66

Slide 66

THE APP STORE

Slide 67

Slide 67

$ € ¥ £ € ₽ kr. ¥ ‫دج‬ ¥ $€ £ ₽

Slide 68

Slide 68

Slide 69

Slide 69

Slide 70

Slide 70

Slide 71

Slide 71

Slide 72

Slide 72

Slide 73

Slide 73

Slide 74

Slide 74

Slide 75

Slide 75

Slide 76

Slide 76

Slide 77

Slide 77

Slide 78

Slide 78

Slide 79

Slide 79

Slide 80

Slide 80

PACKAGED WEB APPS

Slide 81

Slide 81

}

Slide 82

Slide 82

HOSTED WEB APPS

Slide 83

Slide 83

  • URL of the hosted web app }

Slide 84

Slide 84

Slide 85

Slide 85

2007

Slide 86

Slide 86

application.xml <application xmlns="http://ns.adobe.com/air/application/2.5"> <id>nl.salonhub.Salonhub</id> <filename>Salonhub</filename> <name>Salonhub</name> <versionNumber>6.0.356</versionNumber> <description>De flexibele en complete oplossing voor uw kapsalon</description> <initialWindow> <content>platform/air/app/index.html</content> <width>1024</width> <height>768</height>

Slide 87

Slide 87

adt -package -storetype pkcs12 -keystore cert.p12 -storepass ****** dist/air/Salonhub-6.0.365.air build/air/application.xml -C build/air assets external lib platform settings.js

Slide 88

Slide 88

Salonhub.air

Slide 89

Slide 89

Slide 90

Slide 90

2007

Slide 91

Slide 91

2007

Slide 92

Slide 92

2009

Slide 93

Slide 93

Vibration Dialogs Network Information Camera Device Motion Battery Status Splashscreen DEVICE API’S Files Statusbar Device Orientation Media Capture Geolocation File Transfers Media

Slide 94

Slide 94

PLUGINS

Slide 95

Slide 95

“ PhoneGap is a polyfill, and the ultimate purpose of PhoneGap is to cease to exist — Brian LeRoux

Slide 96

Slide 96

2009

Slide 97

Slide 97

2012 chrome app

Slide 98

Slide 98

chromebook

Slide 99

Slide 99

chrome web store

Slide 100

Slide 100

2012 chrome app

Slide 101

Slide 101

2013

Slide 102

Slide 102

Slide 103

Slide 103

chromium +

Slide 104

Slide 104

launch.js const electron = require('electron'); const app = electron.app; let mainWindow; function createWindow () { mainWindow = new electron.BrowserWindow({ width: 800, height: 600 }); mainWindow.loadURL('file://' + __dirname + '/app/index.html'); mainWindow.on('closed', () => { mainWindow = null }); } app.on('ready', () => { createWindow(); }); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); }

Slide 105

Slide 105

2013

Slide 106

Slide 106

2013

Slide 107

Slide 107

2014 Universal Windows Platform

Slide 108

Slide 108

Slide 109

Slide 109

Slide 110

Slide 110

Slide 111

Slide 111

Slide 112

Slide 112

Slide 113

Slide 113

Slide 114

Slide 114

Slide 115

Slide 115

npm install -g manifoldjs manifoldjs https://airhorner.com -d ~/Projects -p windows10 manifoldjs package ~/Projects/AirHorner/windows10

Slide 116

Slide 116

UNIVERSAL WINDOWS APPS HAVE ACCESS TO THE UNIVERSAL WINDOWS API

Slide 117

Slide 117

DEPLOY ON DESKTOP, MOBILE AND XBOX ONE

Slide 118

Slide 118

2014 Universal Windows Platform

Slide 119

Slide 119

AND MANY MORE…

Slide 120

Slide 120

BUT…

Slide 121

Slide 121

DEPENDANT ON THIRD PARTIES

Slide 122

Slide 122

NOT PART OF THE WEB

Slide 123

Slide 123

Slide 124

Slide 124

PROGRESSIVE WEB APPS

Slide 125

Slide 125

WEB MANIFEST

Slide 126

Slide 126

index.html <!doctype> <html> <head> <title>HTML5test - How well does your browser support HTML5?</title>

Slide 127

Slide 127

index.html <!doctype> <html> <head> <title>HTML5test - How well does your browser support HTML5?</title> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black">

Slide 128

Slide 128

index.html <!doctype> <html> <head> <title>HTML5test - How well does your browser support HTML5?</title> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link <link <link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> sizes="114x114" href="/apple-icon-114x114.png"> sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> sizes="152x152" href="/apple-icon-152x152.png">

Slide 129

Slide 129

<!doctype> <html> <head> <title>HTML5test - How well does your browser support HTML5?</title> <meta name="apple-mobile-web-app-capable" index.htmlcontent="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link <link <link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> sizes="114x114" href="/apple-icon-114x114.png"> sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> sizes="152x152" href="/apple-icon-152x152.png">

Slide 130

Slide 130

<!doctype> <html> <head> <title>HTML5test - How well does your browser support HTML5?</title> <meta name="apple-mobile-web-app-capable" index.htmlcontent="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link <link <link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> sizes="114x114" href="/apple-icon-114x114.png"> sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> sizes="152x152" href="/apple-icon-152x152.png">

<meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0092bf">

Slide 131

Slide 131

<!doctype> <html> <head> <title>HTML5test - How well does your browser support HTML5?</title> <meta name="apple-mobile-web-app-capable" index.htmlcontent="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link <link <link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> sizes="114x114" href="/apple-icon-114x114.png"> sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> sizes="152x152" href="/apple-icon-152x152.png">

<meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0092bf"> <link <link <link <link <link rel="icon" rel="icon" rel="icon" rel="icon" rel="icon" type="image/png" type="image/png" type="image/png" type="image/png" type="image/png" href="/icon-16x16.png" sizes="16x16"> href="/icon-32x32.png" sizes="32x32"> href="/icon-96x96.png" sizes="96x96"> href="/icon-160x160.png" sizes="160x160"> href="/icon-196x196.png" sizes="196x196">

Slide 132

Slide 132

<link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> index.html sizes="152x152" href="/apple-icon-152x152.png"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0092bf"> <link <link <link <link <link rel="icon" rel="icon" rel="icon" rel="icon" rel="icon" type="image/png" type="image/png" type="image/png" type="image/png" type="image/png" href="/icon-16x16.png" sizes="16x16"> href="/icon-32x32.png" sizes="32x32"> href="/icon-96x96.png" sizes="96x96"> href="/icon-160x160.png" sizes="160x160"> href="/icon-196x196.png" sizes="196x196">

Slide 133

Slide 133

<link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> index.html sizes="152x152" href="/apple-icon-152x152.png"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0092bf"> <link <link <link <link <link rel="icon" rel="icon" rel="icon" rel="icon" rel="icon" type="image/png" type="image/png" type="image/png" type="image/png" type="image/png" href="/icon-16x16.png" sizes="16x16"> href="/icon-32x32.png" sizes="32x32"> href="/icon-96x96.png" sizes="96x96"> href="/icon-160x160.png" sizes="160x160"> href="/icon-196x196.png" sizes="196x196"> <meta name="application-name" content="HTML5test"> <meta name="msapplication-TileColor" content="#0092bf"> <meta name="msapplication-TileImage" content="/mstile-144x144.png">

Slide 134

Slide 134

PLACE EVERYTHING IN A SEPARATE JSON FILE

Slide 135

Slide 135

manifest.json { "name": "HTML5test", "theme_color": "#0092bf", "display": "standalone", "icons": [ { "src": "/icon-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/icon-256x256.png", "sizes": "256x256", "type": "image/png" }, { "src": "/icon-512x512.png", "sizes": "512x512", "type": "image/png" }

Slide 136

Slide 136

APP NAME ICONS THEME COLORS SETTINGS

Slide 137

Slide 137

LAUNCH FULL SCREEN { "display": "standalone" }

Slide 138

Slide 138

LIMIT SCREEN ORIENTATION { "orientation": "portrait" }

Slide 139

Slide 139

START A DIFFERENT URL { "start_url": "standalone.html" }

Slide 140

Slide 140

Slide 141

Slide 141

index.html <!doctype> <html> <head> <title>HTML5test - How well does your browser support HTML5?</title> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link <link <link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> sizes="114x114" href="/apple-icon-114x114.png"> sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> sizes="152x152" href="/apple-icon-152x152.png">

<meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0092bf"> <link rel="icon" type="image/png" href="/icon-16x16.png" sizes="16x16">

Slide 142

Slide 142

<link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> index.html sizes="152x152" href="/apple-icon-152x152.png"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0092bf"> <link <link <link <link <link rel="icon" rel="icon" rel="icon" rel="icon" rel="icon" type="image/png" type="image/png" type="image/png" type="image/png" type="image/png" href="/icon-16x16.png" sizes="16x16"> href="/icon-32x32.png" sizes="32x32"> href="/icon-96x96.png" sizes="96x96"> href="/icon-160x160.png" sizes="160x160"> href="/icon-196x196.png" sizes="196x196"> <meta name="application-name" content="HTML5test"> <meta name="msapplication-TileColor" content="#0092bf"> <meta name="msapplication-TileImage" content="/mstile-144x144.png">

Slide 143

Slide 143

<link <link <link <link <link <link rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png"> sizes="144x144" href="/apple-icon-144x144.png"> sizes="60x60" href="/apple-icon-60x60.png"> sizes="120x120" href="/apple-icon-120x120.png"> sizes="76x76" href="/apple-icon-76x76.png"> index.html sizes="152x152" href="/apple-icon-152x152.png"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0092bf"> <link <link <link <link <link rel="icon" rel="icon" rel="icon" rel="icon" rel="icon" type="image/png" type="image/png" type="image/png" type="image/png" type="image/png" href="/icon-16x16.png" sizes="16x16"> href="/icon-32x32.png" sizes="32x32"> href="/icon-96x96.png" sizes="96x96"> href="/icon-160x160.png" sizes="160x160"> href="/icon-196x196.png" sizes="196x196"> <meta name="application-name" content="HTML5test"> <meta name="msapplication-TileColor" content="#0092bf"> <meta name="msapplication-TileImage" content="/mstile-144x144.png"> <link rel="manifest" href="/manifest.json">

Slide 144

Slide 144

BROWSER SUPPORT Chrome 39 Opera 32

Slide 145

Slide 145

DEVICE API’S

Slide 146

Slide 146

VIBRATION navigator.vibrate(200); navigator.vibrate([100, 200, 200, 200, 500]);

Slide 147

Slide 147

CAMERA & MICROPHONE navigator.getUserMedia( { audio: true, video: { width: 1280, height: 720 } }, function(stream) { }, function(err) { } });

Slide 148

Slide 148

BATTERY navigator.getBattery().then(function(battery) { battery.addEventListener('chargingchange', function() { console.log(battery.charging); }); battery.addEventListener('levelchange', function() { console.log(battery.level); }); });

Slide 149

Slide 149

GEOLOCATION DEVICE MOTION DEVICE ORIENTATION AMBIENT LIGHT BLUETOOTH

Slide 150

Slide 150

SERVICE WORKERS

Slide 151

Slide 151

“ Application Cache is a Douchebag! — Jake Archibald

Slide 152

Slide 152

Slide 153

Slide 153

Slide 154

Slide 154

Slide 155

Slide 155

? ×

Slide 156

Slide 156

if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js'); }

Slide 157

Slide 157

Slide 158

Slide 158

Slide 159

Slide 159

×

Slide 160

Slide 160

THE SERVICE WORKER RUNS JAVASCRIPT CODE :-)

Slide 161

Slide 161

sw.js self.addEventListener('install', function(event) { // Perform install steps });

Slide 162

Slide 162

sw.js self.addEventListener('install', function(event) { event.waitUntil( caches.open('v1').then(function(cache) { return cache.addAll([ '/index.html', '/styles/main.css', '/scripts/main.js' ]); }) ); });

Slide 163

Slide 163

return cache.addAll([ '/index.html', '/styles/main.css', '/scripts/main.js' ]); }) ); }); sw.js

Slide 164

Slide 164

return cache.addAll([ '/index.html', '/styles/main.css', '/scripts/main.js' ]); }) sw.js ); }); self.addEventListener('fetch', function(event) { // Intercept network requests });

Slide 165

Slide 165

return cache.addAll([ '/index.html', '/styles/main.css', '/scripts/main.js' ]); }) sw.js ); }); self.addEventListener('fetch', function(event) { event.respondWith( caches.match(event.request) .then(function(response) { if (response) { return response; } return fetch(event.request); } ) ); });

Slide 166

Slide 166

THE SERVICE WORKER IS INDEPENDENT OF YOUR WEBPAGE

Slide 167

Slide 167

BROWSER SUPPORT Chrome 40 Opera 27 Firefox 44 Samsung 4 Edge (behind flag)

Slide 168

Slide 168

PUSH NOTIFICATIONS

Slide 169

Slide 169

WEB PUSH API WEB PUSH PROTOCOL WEB NOTIFICATIONS SERVICE WORKERS

Slide 170

Slide 170

Slide 171

Slide 171

navigator.serviceWorker.ready.then(function(sw) { sw.pushManager.subscribe().then(function(subscription) { // Send subscription to server }) })

Slide 172

Slide 172

Send the subscription data to our server, including the URL of the push server

Slide 173

Slide 173

The webpage is closed and the service worker is sleeping

Slide 174

Slide 174

The server has new information for the user

Slide 175

Slide 175

The server sends a message to the push server using the Web Push protocol

Slide 176

Slide 176

The push server wakes up the service worker

Slide 177

Slide 177

self.addEventListener('push', function(event) { // We received a push message });

Slide 178

Slide 178

(optional)

Slide 179

Slide 179

self.registration.showNotification('Attention!', { body: 'Push message received', icon: 'icon.png' }); (optional)

Slide 180

Slide 180

The webpage is still closed and the service worker is sleeping again

Slide 181

Slide 181

BROWSER SUPPORT Chrome 42 Opera 30 Firefox 44 Samsung 4 Edge (behind flag)

Slide 182

Slide 182

WEB PAYMENTS

Slide 183

Slide 183

Start payment process by clicking a button in your app

Slide 184

Slide 184

Start payment process by clicking a button in your app var methodData = [ { supportedMethods: ["visa", "mastercard"] } ];

Slide 185

Slide 185

var details = { displayItems: [ { label: "Donation", amount: { currency: "USD", value : "55.00" } } ], total: { label: "Total", amount: { currency: "USD", value : "55.00" } } }; Start payment process by clicking a button in your app

Slide 186

Slide 186

var request = new PaymentRequest( methodData, // required payment method data details // required transaction information );

Slide 187

Slide 187

request.show().then(function(response) { // success }).catch(function(err) { // failed });

Slide 188

Slide 188

Select your payment method or use the default

Slide 189

Slide 189

Enter your CVC code or confirm with your fingerprint

Slide 190

Slide 190

Done!

Slide 191

Slide 191

BROWSER SUPPORT Chrome Samsung 4 Edge (coming soon) (behind flag)

Slide 192

Slide 192

BUT WHAT ABOUT THE DESKTOP?

Slide 193

Slide 193

BROWSER DEVELOPMENT IS DRIVEN BY MOBILE

Slide 194

Slide 194

Slide 195

Slide 195

BUT…

Slide 196

Slide 196

NATIVE PWA SUPPORT IN THE WINDOWS STORE

Slide 197

Slide 197

NATIVE PWA SUPPORT IN THE WINDOWS STORE

Slide 198

Slide 198

Slide 199

Slide 199

BUT WHAT ABOUT APPLE?

Slide 200

Slide 200

THIS IS NOT A GOOGLE THING

Slide 201

Slide 201

Slide 202

Slide 202

BUT…

Slide 203

Slide 203

× ?

Slide 204

Slide 204

THE OLD HACKS STILL WORK

Slide 205

Slide 205

MAYBE, HOPEFULLY, POSSIBLY THIS WILL CHANGE IN THE FUTURE

Slide 206

Slide 206

OR NOT

Slide 207

Slide 207

Slide 208

Slide 208

Slide 209

Slide 209

Slide 210

Slide 210

Slide 211

Slide 211

Slide 212

Slide 212

Slide 213

Slide 213

Slide 214

Slide 214

THANK YOU! @HTML5TEST

Slide 215

Slide 215

PROGRESSIVE WEB APPS CODE LAB 14:00 - 15:30

Slide 216

Slide 216

18 NOVEMBER, LONDON Dylan Schiemann, Christian Heilmann, Mark Wubben, Jonathan Fielding and me