Slide 1

Slide 1 text

Enterprise Apps for the Web Platform Bradley Holt Program Manager, Developer Advocacy Center for Open-Source Data and AI Technologies September 15, 2018 / © 2018 IBM Corporation

Slide 2

Slide 2 text

Center for Open- Source Data and AI Technologies (CODAIT) September 15, 2018 / © 2018 IBM Corporation http://codait.org/

Slide 3

Slide 3 text

The Web Platform September 15, 2018 / © 2018 IBM Corporation NASA Earth's Light by NASA Goddard Space Flight Center, on Flickr (CC BY 2.0).

Slide 4

Slide 4 text

Instagram and other Social Media Apps by Jason Howie, on Flickr (CC BY 2.0). Native Apps

Slide 5

Slide 5 text

September 15, 2018 / © 2018 IBM Corporation

Slide 6

Slide 6 text

Cubes Colored by blizzy78, on Flickr (CC BY 2.0). Native App Complexities

Slide 7

Slide 7 text

Hybrid Mobile Apps September 15, 2018 / © 2018 IBM Corporation

Slide 8

Slide 8 text

Fotolia_0054 by Bildarchiv Universität Bielefeld, on Flickr (CC BY 2.0). Walled Gardens

Slide 9

Slide 9 text

lights in the dark by Celan Remus, on Flickr (CC BY 2.0). The Open Web

Slide 10

Slide 10 text

Progressive Web Apps Provides both the discoverability of a web app and the reliable, fast, and engaging user experience of a native mobile app September 15, 2018 / © 2018 IBM Corporation

Slide 11

Slide 11 text

https://www.pwastats.com/

Slide 12

Slide 12 text

Twitter Lite Twitter Lite is fast, works offline, can be installed to your home screen, can send you push notifications, and is accessible on the open web September 15, 2018 / © 2018 IBM Corporation https://lite.twitter.com/content/lite-twitter/en.html

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Not just offline… Accès wi-fi à Gorakshep (5140m) by Jerome Bon, on Flickr (CC BY 2.0).

Slide 15

Slide 15 text

Instant access to content & data speed 3 by Monkieyes, on Flickr (CC BY 2.0).

Slide 16

Slide 16 text

Reliable, fast, and engaging user experience— regardless of network connectivity Static Wallpaper by James Spinks, on Flickr (CC BY-SA 2.0).

Slide 17

Slide 17 text

Offline, Online & ¯\_(ツ)_/¯ September 15, 2018 / © 2018 IBM Corporation

Slide 18

Slide 18 text

The next billion people on the internet the galaxy by tommy@chau, on Flickr (CC BY 2.0).

Slide 19

Slide 19 text

Web Platform Tools for Developers September 15, 2018 / © 2018 IBM Corporation lines lines by Yosuke Hayashi, on Flickr (CC BY 2.0).

Slide 20

Slide 20 text

Geolocation API Network Information API IndexedDB WebRTC API Push API Notifications API Device Orientation API Screen Orientation API Permissions API Proximity API Pointer Lock API Vibration API Payment Request API Battery Status API Ambient Light Sensor API Service Worker API IBM Design Icons by International Business Machines Corporation (CC BY 4.0). September 15, 2018 / © 2018 IBM Corporation

Slide 21

Slide 21 text

Add to Home Screen Apps meeting certain guidelines can prompt users to add the app to the Home screen on modern devices Chrome add to Home screen banner by Mozilla Contributors (CC-BY-SA 2.5). September 15, 2018 / © 2018 IBM Corporation

Slide 22

Slide 22 text

Notifications API Notifications can deliver new content to users, even when the app is closed PWA notification by Mozilla Contributors (CC-BY-SA 2.5). September 15, 2018 / © 2018 IBM Corporation

Slide 23

Slide 23 text

Payment Request API The Payment Request API enables in-app payments via credit card or payment processors such as Google Pay Example of basic-card support in the Payment Request API by Google Developers (CC BY 3.0). September 15, 2018 / © 2018 IBM Corporation

Slide 24

Slide 24 text

Service Workers Service Workers allow for fine- grained control over caching of content and assets, enabling cache-first web apps Service Workers fetch diagram by Mozilla Contributors (CC-BY-SA 2.5). September 15, 2018 / © 2018 IBM Corporation

Slide 25

Slide 25 text

IndexedDB IndexedDB enables app data to be stored locally within a browser IBM Design Icons by International Business Machines Corporation (CC BY 4.0). September 15, 2018 / © 2018 IBM Corporation

Slide 26

Slide 26 text

localForage localForage wraps IndexedDB, WebSQL, or localStorage, providing a consistent API regardless of which storage mechanism is supported by the end user’s browser IBM Design Icons by International Business Machines Corporation (CC BY 4.0). September 15, 2018 / © 2018 IBM Corporation

Slide 27

Slide 27 text

Sync is Hard Technological devices designed by D3Images / Freepik . September 15, 2018 / © 2018 IBM Corporation

Slide 28

Slide 28 text

Apache CouchDB PouchDB IBM Cloudant September 15, 2018 / © 2018 IBM Corporation

Slide 29

Slide 29 text

Offline Sync for Progressive Web Apps PouchDB Devices by Darwin Laganzon, on Pixabay (CC0 Public Domain). | Cloud by Raphael Silva, on Pixabay (CC0 Public Domain). September 15, 2018 / © 2018 IBM Corporation Apache CouchDB

Slide 30

Slide 30 text

Pokedex.org An offline-capable Progressive Web App built with Service Worker and PouchDB https://www.pokedex.org/ September 15, 2018 / © 2018 IBM Corporation

Slide 31

Slide 31 text

Multi-User Apps with Hoodie http://hood.ie/ September 15, 2018 / © 2018 IBM Corporation

Slide 32

Slide 32 text

September 15, 2018 / © 2018 IBM Corporation

Slide 33

Slide 33 text

Devices by Darwin Laganzon, on Pixabay (CC0 Public Domain). | Cloud by Raphael Silva, on Pixabay (CC0 Public Domain). PouchDB September 15, 2018 / © 2018 IBM Corporation Apache CouchDB

Slide 34

Slide 34 text

Shopping List A series of Offline First demo apps— each built using a different stack https://ibm-watson-data-lab.github.io/shopping-list-demo September 15, 2018 / © 2018 IBM Corporation

Slide 35

Slide 35 text

https://developer.ibm.com/code/patterns/create-an-offline-first-shopping-list-progressive-web-app/ September 15, 2018 / © 2018 IBM Corporation

Slide 36

Slide 36 text

Progressive Web Apps, Progressively September 15, 2018 / © 2018 IBM Corporation Uphill by Tuncay, on Flickr (CC BY 2.0).

Slide 37

Slide 37 text

Ensure Your Website is Mobile Friendly September 15, 2018 / © 2018 IBM Corporation • Implement responsive web design • Ensure cross-browser compatibility • Test and improve web performance

Slide 38

Slide 38 text

Improve an Existing Website September 15, 2018 / © 2018 IBM Corporation • Use an SSL/TLS certificate (Let's Encrypt is your friend) • Add a Web App Manifest containing app metadata • Use a Service Worker to make your app cache-first

Slide 39

Slide 39 text

Create a Native App-Like Experience September 15, 2018 / © 2018 IBM Corporation • Provide instant page transitions with a single-page app • Minimize time-to-interactive with the PRPL pattern • Use a local database (IndexedDB, localForage, or PouchDB)

Slide 40

Slide 40 text

Leverage the Web Platform September 15, 2018 / © 2018 IBM Corporation • Ensure that each page can be addressed via a URL • Implement server-side rendering • Bridge any gaps between web platform and native with Ionic

Slide 41

Slide 41 text

Lighthouse Lighthouse is a tool for auditing and improving web apps https://developers.google.com/web/tools/lighthouse/ September 15, 2018 / © 2018 IBM Corporation

Slide 42

Slide 42 text

big bend by Vincent Lock , on Flickr (CC BY 2.0). What will you build on the web platform?

Slide 43

Slide 43 text

Resources September 15, 2018 / © 2018 IBM Corporation • PWA Stats: https://www.pwastats.com/ • localForage: https://localforage.github.io/localForage/ • PouchDB: https://pouchdb.com/ • CouchDB: http://couchdb.apache.org/ • IBM Cloudant: https://www.ibm.com/cloud/cloudant • Hoodie: http://hood.ie/ • Lighthouse: https://developers.google.com/web/tools/lighthouse/ • Ionic: https://ionicframework.com/ • IBM Developer: https://developer.ibm.com/

Slide 44

Slide 44 text

Thank you codait.org twitter.com/BradleyHolt medium.com/@BradleyHolt github.com/bradley-holt developer.ibm.com/code September 15, 2018 / © 2018 IBM Corporation

Slide 45

Slide 45 text

September 15, 2018 / © 2018 IBM Corporation