Slide 1

Slide 1 text

THE PROGRESSION 
 OF WEB APPS NLHTML5 @ DE VOORHOEDE, 20TH OCTOBER 2016

Slide 2

Slide 2 text

THE PROGRESSION 
 OF WEB APPS NLHTML5 @ DE VOORHOEDE, 20TH OCTOBER 2016

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

THE PROGRESSION 
 OF WEB APPS

Slide 6

Slide 6 text

THE PROGRESSION 
 OF WEB APPS

Slide 7

Slide 7 text

PROGRESSIVE WEB APPS

Slide 8

Slide 8 text

Photo by Daniel Appelquist

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

PROGRESSIVE

Slide 11

Slide 11 text

RESPONSIVE

Slide 12

Slide 12 text

CONNECTIVITY INDEPENDENT

Slide 13

Slide 13 text

APP-LIKE

Slide 14

Slide 14 text

FRESH

Slide 15

Slide 15 text

SAFE

Slide 16

Slide 16 text

DISCOVERABLE

Slide 17

Slide 17 text

RE-ENGAGEABLE

Slide 18

Slide 18 text

INSTALLABLE

Slide 19

Slide 19 text

LINKABLE

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

PROGRESSIVE

Slide 22

Slide 22 text

WEB APP

Slide 23

Slide 23 text

RESPONSIVE

Slide 24

Slide 24 text

airhorner.com

Slide 25

Slide 25 text

CONNECTIVITY INDEPENDENT

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

APP-LIKE

Slide 29

Slide 29 text

FRESH

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

FRESH

Slide 32

Slide 32 text

SAFE

Slide 33

Slide 33 text

DISCOVERABLE

Slide 34

Slide 34 text

Hi there! I’m a Web App!

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

INSTALLABLE

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

LINKABLE

Slide 40

Slide 40 text

Airhorner

Slide 41

Slide 41 text

Airhorner no results found

Slide 42

Slide 42 text

https://airhorner.com

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

THIS IS NOT A NEW IDEA

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

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 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

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 text

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 text

No content

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

LOTS OF UGLY HACKS

Slide 57

Slide 57 text

LOTS OF BROWSER QUIRKS

Slide 58

Slide 58 text

NON-STANDARD API’S

Slide 59

Slide 59 text

NO DEVICE API’S

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

BUILDING NATIVE APPS 
 USING WEB TECHNOLOGY

Slide 62

Slide 62 text

WHY?

Slide 63

Slide 63 text

WE KNOW HTML, 
 CSS AND JAVASCRIPT

Slide 64

Slide 64 text

CROSS PLATFORM
 DEVELOPMENT

Slide 65

Slide 65 text

GET ACCESS TO NATIVE API’S

Slide 66

Slide 66 text

THE APP STORE

Slide 67

Slide 67 text

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

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

PACKAGED WEB APPS

Slide 81

Slide 81 text

}

Slide 82

Slide 82 text

HOSTED WEB APPS

Slide 83

Slide 83 text

} + URL of the hosted web app

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

2007

Slide 86

Slide 86 text


 nl.salonhub.Salonhub Salonhub Salonhub 6.0.356 De flexibele en complete oplossing voor uw kapsalon platform/air/app/index.html 1024 768 application.xml

Slide 87

Slide 87 text

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 text

Salonhub.air

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

2007

Slide 91

Slide 91 text

2007

Slide 92

Slide 92 text

2009

Slide 93

Slide 93 text

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

Slide 94

Slide 94 text

PLUGINS

Slide 95

Slide 95 text

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

Slide 96

Slide 96 text

2009

Slide 97

Slide 97 text

2012 chrome app

Slide 98

Slide 98 text

chromebook

Slide 99

Slide 99 text

chrome web store

Slide 100

Slide 100 text

2012 chrome app

Slide 101

Slide 101 text

2013

Slide 102

Slide 102 text

No content

Slide 103

Slide 103 text

chromium +

Slide 104

Slide 104 text

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(); } launch.js

Slide 105

Slide 105 text

2013

Slide 106

Slide 106 text

2013

Slide 107

Slide 107 text

2014 Universal Windows Platform

Slide 108

Slide 108 text

No content

Slide 109

Slide 109 text

No content

Slide 110

Slide 110 text

No content

Slide 111

Slide 111 text

No content

Slide 112

Slide 112 text

No content

Slide 113

Slide 113 text

No content

Slide 114

Slide 114 text

No content

Slide 115

Slide 115 text

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

Slide 116

Slide 116 text

UNIVERSAL WINDOWS APPS HAVE ACCESS TO THE
 UNIVERSAL WINDOWS API

Slide 117

Slide 117 text

DEPLOY ON 
 DESKTOP, MOBILE 
 AND XBOX ONE

Slide 118

Slide 118 text

2014 Universal Windows Platform

Slide 119

Slide 119 text

AND MANY MORE…

Slide 120

Slide 120 text

BUT…

Slide 121

Slide 121 text

DEPENDANT ON THIRD PARTIES

Slide 122

Slide 122 text

NOT PART OF THE WEB

Slide 123

Slide 123 text

No content

Slide 124

Slide 124 text

PROGRESSIVE WEB APPS

Slide 125

Slide 125 text

WEB MANIFEST

Slide 126

Slide 126 text

HTML5test - How well does your browser support HTML5? index.html

Slide 127

Slide 127 text

HTML5test - How well does your browser support HTML5? index.html

Slide 128

Slide 128 text

HTML5test - How well does your browser support HTML5? index.html

Slide 129

Slide 129 text

HTML5test - How well does your browser support HTML5? index.html

Slide 130

Slide 130 text

HTML5test - How well does your browser support HTML5? index.html

Slide 131

Slide 131 text

HTML5test - How well does your browser support HTML5? index.html

Slide 132

Slide 132 text

index.html

Slide 133

Slide 133 text

index.html

Slide 134

Slide 134 text

PLACE EVERYTHING 
 IN A SEPARATE JSON FILE

Slide 135

Slide 135 text

{ "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" } manifest.json

Slide 136

Slide 136 text

APP NAME ICONS
 THEME COLORS SETTINGS

Slide 137

Slide 137 text

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

Slide 138

Slide 138 text

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

Slide 139

Slide 139 text

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

Slide 140

Slide 140 text

No content

Slide 141

Slide 141 text

HTML5test - How well does your browser support HTML5? index.html

Slide 142

Slide 142 text

index.html

Slide 143

Slide 143 text

index.html

Slide 144

Slide 144 text

BROWSER SUPPORT Chrome 39 Opera 32

Slide 145

Slide 145 text

DEVICE API’S

Slide 146

Slide 146 text

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

Slide 147

Slide 147 text

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

Slide 148

Slide 148 text

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 text

GEOLOCATION
 DEVICE MOTION
 DEVICE ORIENTATION AMBIENT LIGHT BLUETOOTH

Slide 150

Slide 150 text

SERVICE WORKERS

Slide 151

Slide 151 text

Application Cache is a Douchebag! “ — Jake Archibald

Slide 152

Slide 152 text

No content

Slide 153

Slide 153 text

No content

Slide 154

Slide 154 text

No content

Slide 155

Slide 155 text

× ?

Slide 156

Slide 156 text

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

Slide 157

Slide 157 text

No content

Slide 158

Slide 158 text

No content

Slide 159

Slide 159 text

×

Slide 160

Slide 160 text

THE SERVICE WORKER RUNS JAVASCRIPT CODE :-)

Slide 161

Slide 161 text

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

Slide 162

Slide 162 text

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

Slide 163

Slide 163 text

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

Slide 164

Slide 164 text

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

Slide 165

Slide 165 text

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

Slide 166

Slide 166 text

THE SERVICE WORKER IS 
 INDEPENDENT OF YOUR WEBPAGE

Slide 167

Slide 167 text

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

Slide 168

Slide 168 text

PUSH NOTIFICATIONS

Slide 169

Slide 169 text

WEB PUSH 
 API WEB PUSH 
 PROTOCOL SERVICE WORKERS WEB NOTIFICATIONS

Slide 170

Slide 170 text

No content

Slide 171

Slide 171 text

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

Slide 172

Slide 172 text

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

Slide 173

Slide 173 text

The webpage is closed and 
 the service worker is sleeping

Slide 174

Slide 174 text

The server has new 
 information for the user

Slide 175

Slide 175 text

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

Slide 176

Slide 176 text

The push server wakes up 
 the service worker

Slide 177

Slide 177 text

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

Slide 178

Slide 178 text

(optional)

Slide 179

Slide 179 text

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

Slide 180

Slide 180 text

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

Slide 181

Slide 181 text

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

Slide 182

Slide 182 text

WEB PAYMENTS

Slide 183

Slide 183 text

Start payment process by clicking a button in your app

Slide 184

Slide 184 text

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

Slide 185

Slide 185 text

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

Slide 186

Slide 186 text

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

Slide 187

Slide 187 text

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

Slide 188

Slide 188 text

Select your payment 
 method or use the default

Slide 189

Slide 189 text

Enter your CVC code or confirm with your fingerprint

Slide 190

Slide 190 text

Done!


Slide 191

Slide 191 text

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

Slide 192

Slide 192 text

BUT WHAT ABOUT 
 THE DESKTOP?

Slide 193

Slide 193 text

BROWSER DEVELOPMENT 
 IS DRIVEN BY MOBILE

Slide 194

Slide 194 text

No content

Slide 195

Slide 195 text

BUT…

Slide 196

Slide 196 text

NATIVE PWA SUPPORT 
 IN THE WINDOWS STORE

Slide 197

Slide 197 text

NATIVE PWA SUPPORT 
 IN THE WINDOWS STORE

Slide 198

Slide 198 text

No content

Slide 199

Slide 199 text

BUT WHAT ABOUT 
 APPLE?

Slide 200

Slide 200 text

THIS IS NOT A GOOGLE THING

Slide 201

Slide 201 text

No content

Slide 202

Slide 202 text

BUT…

Slide 203

Slide 203 text

? ×

Slide 204

Slide 204 text

THE OLD HACKS STILL WORK

Slide 205

Slide 205 text

MAYBE, HOPEFULLY, POSSIBLY
 THIS WILL CHANGE IN THE FUTURE

Slide 206

Slide 206 text

OR NOT

Slide 207

Slide 207 text

No content

Slide 208

Slide 208 text

No content

Slide 209

Slide 209 text

No content

Slide 210

Slide 210 text

No content

Slide 211

Slide 211 text

No content

Slide 212

Slide 212 text

No content

Slide 213

Slide 213 text

No content

Slide 214

Slide 214 text

THANK YOU! @HTML5TEST

Slide 215

Slide 215 text

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