Slide 1

Slide 1 text

THE PROGRESSION 
 OF WEB APPS FRONTEERS @ MIRABEAU, 18TH AUGUST 2016

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

THE PROGRESSION 
 OF WEB APPS

Slide 5

Slide 5 text

PROGRESSIVE WEB APPS

Slide 6

Slide 6 text

Photo by Daniel Appelquist

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

PROGRESSIVE

Slide 9

Slide 9 text

WEB APP

Slide 10

Slide 10 text

WEB APP

Slide 11

Slide 11 text

WEB APP

Slide 12

Slide 12 text

WEB APP

Slide 13

Slide 13 text

RESPONSIVE

Slide 14

Slide 14 text

airhorner.com

Slide 15

Slide 15 text

CONNECTIVITY INDEPENDENT

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

APP-LIKE

Slide 18

Slide 18 text

APP-LIKE

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

FRESH

Slide 21

Slide 21 text

SAFE

Slide 22

Slide 22 text

DISCOVERABLE

Slide 23

Slide 23 text

Hi there! I’m a Web App!

Slide 24

Slide 24 text

RE-ENGAGEABLE

Slide 25

Slide 25 text

INSTALLABLE

Slide 26

Slide 26 text

airhorner.com

Slide 27

Slide 27 text

airhorner.com

Slide 28

Slide 28 text

LINKABLE

Slide 29

Slide 29 text

Airhorner

Slide 30

Slide 30 text

Airhorner no results found

Slide 31

Slide 31 text

https://airhorner.com

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

THIS IS NOT A NEW IDEA

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 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 36

Slide 36 text

No content

Slide 37

Slide 37 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 38

Slide 38 text

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

Slide 39

Slide 39 text

LOTS OF UGLY HACKS

Slide 40

Slide 40 text

LOTS OF BROWSER QUIRKS

Slide 41

Slide 41 text

NON-STANDARD API’S

Slide 42

Slide 42 text

NO DEVICE API’S

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

BUILDING NATIVE APPS 
 USING WEB TECHNOLOGY

Slide 45

Slide 45 text

WHY?

Slide 46

Slide 46 text

WE KNOW HTML, 
 CSS AND JAVASCRIPT

Slide 47

Slide 47 text

CROSS PLATFORM
 DEVELOPMENT

Slide 48

Slide 48 text

GET ACCESS TO NATIVE API’S

Slide 49

Slide 49 text

THE APP STORE

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

PACKAGED WEB APPS

Slide 61

Slide 61 text

}

Slide 62

Slide 62 text

HOSTED WEB APPS

Slide 63

Slide 63 text

} + URL of the hosted web app

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

2007

Slide 66

Slide 66 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 67

Slide 67 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 68

Slide 68 text

Salonhub.air

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

2009

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

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

Slide 73

Slide 73 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 74

Slide 74 text

PLUGINS

Slide 75

Slide 75 text

2012 chrome app

Slide 76

Slide 76 text

chromebook

Slide 77

Slide 77 text

chrome web store

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

×

Slide 80

Slide 80 text

2013

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

chromium +

Slide 83

Slide 83 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 84

Slide 84 text

2014 Universal Windows Platform

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

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

Slide 93

Slide 93 text

UNIVERSAL WINDOWS APPS HAVE ACCESS TO THE
 UNIVERSAL WINDOWS API

Slide 94

Slide 94 text

DEPLOY ON 
 DESKTOP, MOBILE 
 AND XBOX ONE

Slide 95

Slide 95 text

AND MANY MORE…

Slide 96

Slide 96 text

BUT…

Slide 97

Slide 97 text

DEPENDANT ON THIRD PARTIES

Slide 98

Slide 98 text

NOT PART OF THE WEB

Slide 99

Slide 99 text

No content

Slide 100

Slide 100 text

PROGRESSIVE WEB APPS

Slide 101

Slide 101 text

WEB MANIFEST

Slide 102

Slide 102 text

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

Slide 103

Slide 103 text

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

Slide 104

Slide 104 text

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

Slide 105

Slide 105 text

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

Slide 106

Slide 106 text

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

Slide 107

Slide 107 text

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

Slide 108

Slide 108 text

index.html

Slide 109

Slide 109 text

index.html

Slide 110

Slide 110 text

PLACE EVERYTHING 
 IN A SEPARATE JSON FILE

Slide 111

Slide 111 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 112

Slide 112 text

APP NAME ICONS
 THEME COLORS SETTINGS

Slide 113

Slide 113 text

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

Slide 114

Slide 114 text

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

Slide 115

Slide 115 text

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

Slide 116

Slide 116 text

No content

Slide 117

Slide 117 text

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

Slide 118

Slide 118 text

index.html

Slide 119

Slide 119 text

index.html

Slide 120

Slide 120 text

NOT POSSIBLE TO SPECIFY 
 DIFFERENT ICON STYLES FOR 
 DIFFERENT PLATFORMS :-(

Slide 121

Slide 121 text

No content

Slide 122

Slide 122 text

BROWSER SUPPORT Chrome 39 Opera 32

Slide 123

Slide 123 text

DEVICE API’S

Slide 124

Slide 124 text

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

Slide 125

Slide 125 text

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

Slide 126

Slide 126 text

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

Slide 127

Slide 127 text

GEOLOCATION
 DEVICE MOTION
 DEVICE ORIENTATION AMBIENT LIGHT BLUETOOTH

Slide 128

Slide 128 text

SERVICE WORKERS

Slide 129

Slide 129 text

Application Cache is a Douchebag! “ — Jake Archibald

Slide 130

Slide 130 text

No content

Slide 131

Slide 131 text

No content

Slide 132

Slide 132 text

No content

Slide 133

Slide 133 text

× ?

Slide 134

Slide 134 text

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

Slide 135

Slide 135 text

No content

Slide 136

Slide 136 text

No content

Slide 137

Slide 137 text

×

Slide 138

Slide 138 text

THE SERVICE WORKER RUNS JAVASCRIPT CODE :-)

Slide 139

Slide 139 text

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

Slide 140

Slide 140 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 141

Slide 141 text

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

Slide 142

Slide 142 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 143

Slide 143 text

THE SERVICE WORKER IS 
 INDEPENDENT OF YOUR WEBPAGE

Slide 144

Slide 144 text

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

Slide 145

Slide 145 text

PUSH NOTIFICATIONS

Slide 146

Slide 146 text

WEB PUSH 
 API WEB PUSH 
 PROTOCOL SERVICE WORKERS WEB NOTIFICATIONS

Slide 147

Slide 147 text

No content

Slide 148

Slide 148 text

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

Slide 149

Slide 149 text

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

Slide 150

Slide 150 text

The webpage is closed and 
 the service worker is sleeping

Slide 151

Slide 151 text

The server has new 
 information for the user

Slide 152

Slide 152 text

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

Slide 153

Slide 153 text

The push server wakes up 
 the service worker

Slide 154

Slide 154 text

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

Slide 155

Slide 155 text

(optional)

Slide 156

Slide 156 text

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

Slide 157

Slide 157 text

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

Slide 158

Slide 158 text

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

Slide 159

Slide 159 text

WEB PAYMENTS

Slide 160

Slide 160 text

Start payment process by clicking a button in your app

Slide 161

Slide 161 text

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

Slide 162

Slide 162 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 163

Slide 163 text

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

Slide 164

Slide 164 text

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

Slide 165

Slide 165 text

Select your payment 
 method or use the default

Slide 166

Slide 166 text

Enter your CVC code or confirm with your fingerprint

Slide 167

Slide 167 text

Done!


Slide 168

Slide 168 text

BROWSER SUPPORT Chrome Edge (behind flag)

Slide 169

Slide 169 text

BUT WHAT ABOUT 
 THE DESKTOP?

Slide 170

Slide 170 text

BROWSER DEVELOPMENT 
 IS DRIVEN BY MOBILE

Slide 171

Slide 171 text

No content

Slide 172

Slide 172 text

BUT…

Slide 173

Slide 173 text

NATIVE PWA SUPPORT 
 IN THE WINDOWS STORE

Slide 174

Slide 174 text

No content

Slide 175

Slide 175 text

BUT WHAT ABOUT 
 APPLE?

Slide 176

Slide 176 text

THIS IS NOT A GOOGLE THING

Slide 177

Slide 177 text

No content

Slide 178

Slide 178 text

BUT…

Slide 179

Slide 179 text

?

Slide 180

Slide 180 text

? ×

Slide 181

Slide 181 text

THE OLD HACKS STILL WORK

Slide 182

Slide 182 text

MAYBE, HOPEFULLY, POSSIBLY
 THIS WILL CHANGE IN THE FUTURE

Slide 183

Slide 183 text

OR NOT

Slide 184

Slide 184 text

No content

Slide 185

Slide 185 text

No content

Slide 186

Slide 186 text

No content

Slide 187

Slide 187 text

THANK YOU! @HTML5TEST