Slide 1

Slide 1 text

GOING PROGRESSIVE WITH SAMANTA DE BARROS EMBERCONF 2017

Slide 2

Slide 2 text

+

Slide 3

Slide 3 text

PROGRESSIVE WEB APP CARMELO, URUGUAY

Slide 4

Slide 4 text

“Progressive Web Apps take advantage of new technologies to bring the best of mobile sites & native apps to users. They’re reliable, fast, and engaging. They originate from a secure origin and load regardless of network state.“ - Addy Osmani

Slide 5

Slide 5 text

I HAVE A DREAM…

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

PROGRESSIVE WEB APP? LA PEDRERA, URUGUAY

Slide 11

Slide 11 text

LOOKS GOOD

Slide 12

Slide 12 text

LOOKS GOOD INSTALLS ON DEVICE

Slide 13

Slide 13 text

LOOKS GOOD INSTALLS ON DEVICE WORKS OFFLINE

Slide 14

Slide 14 text

LOOKS GOOD INSTALLS ON DEVICE WORKS OFFLINE WORKS FAST

Slide 15

Slide 15 text

PUNTA DEL ESTE, URUGUAY LOOKS GOOD?

Slide 16

Slide 16 text

NATIVE VS WEB

Slide 17

Slide 17 text

PUNTA DEL DIABLO, URUGUAY INSTALLS ON DEVICE?

Slide 18

Slide 18 text

THE WEB APP MANIFEST

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

BEFORE

Slide 25

Slide 25 text

AFTER

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

BEFORE

Slide 29

Slide 29 text

AFTER

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

ember-web-app Generates App Manifest and iOS tags from config file github: san650/ember-web-app

Slide 32

Slide 32 text

config/manifest.js

Slide 33

Slide 33 text

LOOKS GOOD INSTALLS ON DEVICE WORKS OFFLINE WORKS FAST

Slide 34

Slide 34 text

WORKS OFFLINE? LA PEDRERA, URUGUAY

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

THE SERVICE WORKER

Slide 37

Slide 37 text

It’s a script Runs in the background Doesn't need a web page or user interaction

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

SAVE ASSETS ON INSTALL EVENT

Slide 43

Slide 43 text

SAVE ASSETS ON INSTALL EVENT INTERCEPT EVERY REQUEST

Slide 44

Slide 44 text

SAVE ASSETS ON INSTALL EVENT INTERCEPT EVERY REQUEST BACKGROUND SYNC

Slide 45

Slide 45 text

SAVE ASSETS ON INSTALL EVENT INTERCEPT EVERY REQUEST BACKGROUND SYNC PUSH NOTIFICATIONS

Slide 46

Slide 46 text

SAVE ASSETS ON INSTALL EVENT INTERCEPT EVERY REQUEST BACKGROUND SYNC PUSH NOTIFICATIONS ALL YOU CAN DREAM OF

Slide 47

Slide 47 text

ember-service-worker broccoli-serviceworker

Slide 48

Slide 48 text

ember-service-worker Plugable approach Base addon just registers SW Add plugins for different cache strategies github: dockyard/ember-service-worker

Slide 49

Slide 49 text

ember-service-worker ember-service-worker-index ember-service-worker-asset-cache ember-service-worker-cache-fallback

Slide 50

Slide 50 text

broccoli-serviceworker Generates SW based on configuration Pre-caches app files by default github: jkleinsc/broccoli-serviceworker

Slide 51

Slide 51 text

app/config/environment.js

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

BEFORE

Slide 57

Slide 57 text

AFTER

Slide 58

Slide 58 text

AFTER

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

Chrome 37.7% MOBILE BROWSER USAGE WORLDWIDE Safari 22.2% Firefox 0.1% IE 0.1% Samsung Internet 5.4% Opera 8.6% http://gs.statcounter.com/browser-market-share/mobile-tablet/worldwide/#monthly-201602-201702-bar

Slide 61

Slide 61 text

MOBILE BROWSER USAGE Safari 55.9% Chrome 31.4% USA http://gs.statcounter.com/browser-market-share/mobile-tablet/united-states-of-america/#monthly-201602-201702-bar

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

THE APPLICATION CACHE

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Generates appcache manifest with app resources Can be configured to ignore certain paths broccoli-manifest github: racido/broccoli-manifest

Slide 69

Slide 69 text

app/config/environment.js

Slide 70

Slide 70 text

USER DATA OFFLINE?

Slide 71

Slide 71 text

LOCAL STORAGE

Slide 72

Slide 72 text

LOCAL STORAGE WEBSQL

Slide 73

Slide 73 text

LOCAL STORAGE WEBSQL INDEXED DB

Slide 74

Slide 74 text

LOCAL STORAGE WEBSQL INDEXED DB LOCAL FORAGE (WRAPS ALL 3)

Slide 75

Slide 75 text

ember-localstorage-adapter ember-localforage-adapter ember-pouch

Slide 76

Slide 76 text

ember-localstorage-adapter Ember data adapter for local storage Local storage: key/value pair store, works with strings github: locks/ember-localstorage-adapter

Slide 77

Slide 77 text

ember-localforage-adapter github: genkgo/ember-localforage-adapter Ember data adapter for local forage LocalForage: wrapper for indexedDb and WebSQL that falls back to local storage

Slide 78

Slide 78 text

ember-pouch Ember Data for PouchDB/ CouchDB Saves data client side to IndexedDB or WebSQL Can sync to PouchDB github: nolanlawson/ember-pouch

Slide 79

Slide 79 text

LOOKS GOOD INSTALLS ON DEVICE WORKS OFFLINE WORKS FAST

Slide 80

Slide 80 text

DOES IT WORK FAST? MONTEVIDEO, URUGUAY

Slide 81

Slide 81 text

NATIVE VS PWA

Slide 82

Slide 82 text

FIRST PAGE RENDER

Slide 83

Slide 83 text

ember-cli-fastboot Server side rendering Still beta github: ember-fastboot/ember-cli-fastboot

Slide 84

Slide 84 text

SECOND PAGE RENDER

Slide 85

Slide 85 text

Service Worker / App Cache

Slide 86

Slide 86 text

TIME TO INTERACTION

Slide 87

Slide 87 text

Allows composition of apps into a single app Lazy loading of engines ember-engines github: ember-engines/ember-engines

Slide 88

Slide 88 text

TOOLS JOSE IGNACIO, URUGUAY

Slide 89

Slide 89 text

LIGHTHOUSE

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

web manifest + service worker + app cache

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

+ fastboot

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

+ ember-engines?

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

BACK TO THAT DREAM… PUNTA DEL ESTE, URUGUAY

Slide 99

Slide 99 text

1. IT IS POSSIBLE

Slide 100

Slide 100 text

1. IT IS POSSIBLE 2. IT IS DOABLE WITH EMBER

Slide 101

Slide 101 text

1. IT IS POSSIBLE 2. IT IS DOABLE WITH EMBER 3. IT CAN GET EVEN BETTER

Slide 102

Slide 102 text

WE NEED YOUR HELP!

Slide 103

Slide 103 text

THANKS! @sami_dbc @sdebarros CABO POLONIO, URUGUAY