57
ESNext, Service Workers, and the Future of the Web ScotlandJS 2016 @JemYoung

ESNext, service workers, and the future of the web

Embed Size (px)

Citation preview

Page 1: ESNext, service workers, and the future of the web

ESNext, Service Workers, and the Future of the Web

ScotlandJS 2016 @JemYoung

Page 2: ESNext, service workers, and the future of the web

June 17, 2015

Page 3: ESNext, service workers, and the future of the web
Page 4: ESNext, service workers, and the future of the web

ES6

let template literals

modules

spread

rest

Symbols

class

default parameters

Map

const

Set

generators

Proxies

WeakMap

integer literals

destructuring

Promises

Iterables

arrow functions

Page 5: ESNext, service workers, and the future of the web

Jem Young Senior UI Engineer

@jemyoung

Page 6: ESNext, service workers, and the future of the web

✦TC39 and ECMAScript✦Service Workers ✦The Future

Page 7: ESNext, service workers, and the future of the web

Why should you listen to me?

Page 8: ESNext, service workers, and the future of the web

https://young.github.io/service-worker/

Page 9: ESNext, service workers, and the future of the web

Why should you listen to me?

Page 10: ESNext, service workers, and the future of the web

TC39 and ECMAScript

Page 11: ESNext, service workers, and the future of the web

TC39

ECMAScript

JavaScript ActionScriptJScriptboooo

boooo

Page 12: ESNext, service workers, and the future of the web

TC39

ECMAScriptES6

Page 13: ESNext, service workers, and the future of the web

ES2016ES7

Page 14: ESNext, service workers, and the future of the web

ES7

Array.includes

Exponentiation operator

Page 15: ESNext, service workers, and the future of the web

ES7

Array.includes

Page 16: ESNext, service workers, and the future of the web

ES7

Exponentiation operator

Page 17: ESNext, service workers, and the future of the web

ESNext

Page 18: ESNext, service workers, and the future of the web

ESNext

String.prototype.padStart

Page 19: ESNext, service workers, and the future of the web

ESNext

String.prototype.padEnd

Page 20: ESNext, service workers, and the future of the web

ESNext

Object.values/Object.entries

Object.getOwnPropertyDescriptors

Page 21: ESNext, service workers, and the future of the web

Service Workers

Page 22: ESNext, service workers, and the future of the web

“Everything seems to point at ServiceWorker being the most significant addition to the web

platform since the introduction of AJAX” -Nicolás Bevacqua

Page 23: ESNext, service workers, and the future of the web

A persistent, fully asynchronous, separately threaded event based worker with the ability to intercept

network requests and cache responses.

Page 24: ESNext, service workers, and the future of the web

Service Worker

Web Worker Service Worker

Page 25: ESNext, service workers, and the future of the web

Service Worker

Web Page Internet

Gimme cats!

OK!

Page 26: ESNext, service workers, and the future of the web

Service Worker

Web Page Internet

Page 27: ESNext, service workers, and the future of the web

Service Worker

Web Page InternetService Worker

Gimme cats!

MDN - Service Workers

Page 28: ESNext, service workers, and the future of the web

Service Worker

A persistent, fully asynchronous, separately threaded event based worker with the ability to intercept network

requests and cache responses.

persistent fully asynchronous separately threadedevent based

cache responsesintercept network

requests

Page 29: ESNext, service workers, and the future of the web

Service Worker

persistent

fully asynchronous

separately threaded

event based

cache responses

intercept network requests

• Exists outside of the browser tab • Knows to when to expire

• Similar to Web Workers

• Does not die when the tab is closed

• No direct control from main thread • install, activate, fetch, message

• Cannot use local storage or XHR • Heavy utilization of Promises

• Proxy Fetch events • Modify requests/responses

• Persistent • Cache Storage/Cache API

Page 31: ESNext, service workers, and the future of the web

Service Worker

Initialization

Page 33: ESNext, service workers, and the future of the web

Service Worker

Page 34: ESNext, service workers, and the future of the web

Service WorkerFetch

Page 35: ESNext, service workers, and the future of the web

Service Worker

Page 36: ESNext, service workers, and the future of the web

Service Worker

Ola Gasidlo - I’m Offline, Cool! What Now?

Page 37: ESNext, service workers, and the future of the web

Service Worker

Page 38: ESNext, service workers, and the future of the web

Service Worker

Page 39: ESNext, service workers, and the future of the web

Service Worker

Page 40: ESNext, service workers, and the future of the web

Service Worker

Page 41: ESNext, service workers, and the future of the web

Service Worker

Page 42: ESNext, service workers, and the future of the web

Service Worker

https://github.com/young/live-transpile

Page 43: ESNext, service workers, and the future of the web

Service Worker

Page 44: ESNext, service workers, and the future of the web

The Future of the Web

Page 45: ESNext, service workers, and the future of the web

The Future FIDO

Page 46: ESNext, service workers, and the future of the web

The FutureF ID Oast entity nline

Page 47: ESNext, service workers, and the future of the web

The Future

Web Bluetooth

Page 48: ESNext, service workers, and the future of the web

The Future

Web Bluetooth

Dan Jenkins - “Getting Physical with Web Bluetooth”

Page 49: ESNext, service workers, and the future of the web

The Future

Page 50: ESNext, service workers, and the future of the web
Page 51: ESNext, service workers, and the future of the web

What is the future of the web?

Page 52: ESNext, service workers, and the future of the web

https://young.github.io/service-worker/

Page 53: ESNext, service workers, and the future of the web

What is the future of the web?

Page 54: ESNext, service workers, and the future of the web

What is the future of the web?

-Service Workers -Progressive Web Applications -ESNext -You!

Page 56: ESNext, service workers, and the future of the web
Page 57: ESNext, service workers, and the future of the web

ESNext, Service Workers, and the Future of the Web

ScotlandJS 2016 @JemYoung