From Mobile First to Offline First at Vermont Code Camp

8896271ee9d6f46d4b1783c9566cb645?s=47 Bradley Holt
September 17, 2016

From Mobile First to Offline First at Vermont Code Camp

It's all too easy assume that your web or mobile app will run on a fast and reliable network with great coverage. The reality for your app's users, though, is often a slow and unreliable network with spotty coverage. What happens when the network doesn't work, or when the device is in airplane mode? You get unhappy, frustrated users. Building on the principles of mobile first, offline first is an approach to application design in which a web, mobile, desktop, or Internet of Things (IoT) application is built for offline usage first and is then progressively enhanced to take advantage of network connectivity when available.

An offline-first app is an app that works, without error, when there is no network connection. An offline-first app can provide a better, faster user experience — both offline and online — by storing content and data locally and then applying progressive enhancement to synchronize with the cloud when a reliable network connection is available. An offline-first approach can be taken with Progressive Web Apps, mobile apps (native and hybrid), desktop apps (e.g. Electron), and Internet of Things (IoT) apps.

8896271ee9d6f46d4b1783c9566cb645?s=128

Bradley Holt

September 17, 2016
Tweet

Transcript

  1. Bradley Holt, Developer Advocate Saturday, September 17, 2016 From Mobile

    First to Offline First Vermont Code Camp
  2. None
  3. None
  4. None
  5. None
  6. None
  7. Web Browsers as Thin Clients

  8. None
  9. None
  10. None
  11. None
  12. None
  13. Embrace the Chaos of Web Development

  14. Progressive Enhancement

  15. Progressive Enhancement

  16. Ubiquitous Connectivity

  17. The Eight Fallacies of Distributed Computing 1.  The network is

    reliable 2.  Latency is zero 3.  Bandwidth is infinite 4.  The network is secure 5.  Topology doesn't change 6.  There is one administrator 7.  Transport cost is zero 8.  The network is homogeneous
  18. ✈ Mode

  19. None
  20. Data Caps

  21. Urban Canyons

  22. Local Dev

  23. Lie-Fi

  24. None
  25. Offline First Lack of connectivity is not an error condition.

  26. None
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. Cloudant Sync

  34. None
  35. One Database Per User userdb-d76846 userdb-905cec userdb-adc95b userdb-c082f2 userdb-730bba userdb-c3d3e5

    userdb-a1ec1f userdb-85a327 userdb-9b9aba userdb-85bcfe serdb-da3d25
  36. Cloudant Envoy A CouchDB proxy to enable replication of database

    subsets
  37. Cloudant FoodTracker

  38. None
  39. None
  40. Cloudant Location Tracker

  41. Offline First IoT

  42. Consumer Offline First IoT

  43. Industrial Offline First IoT

  44. Offline Camp We took the Offline First community for a

    three day retreat in the Catskill Mountains to help foster the growing community around the Offline First movement
  45. None
  46. None
  47. None
  48. None
  49. None
  50. None
  51. None
  52. None
  53. None
  54. None
  55. None
  56. None
  57. None
  58. None
  59. None
  60. Offline Camp on the West Coast Join us November 4-7,

    2016 in Santa Margarita, California (halfway between Los Angeles and San Francisco)
  61. Get Involved! §  Join the Offline First Slack team: offlinefirst.org/chat/

    §  Follow @OfflineCamp on Twitter §  Read the Offline Camp Medium publication: medium.com/offline-camp §  Join us at Offline Camp on the West Coast, in Europe, or at the planned Offline First conference!
  62. None
  63. None
  64. Resources §  Mobile First <http://www.lukew.com/resources/mobile_first.asp> §  Understanding Progressive Enhancement <http://alistapart.com/article/understandingprogressiveenhancement>

    §  The Eight Fallacies of Distributed Computing <https://blogs.oracle.com/jag/resource/Fallacies.html> §  The Impact of Offline First on the Developing World <https://medium.com/offline-camp/the-impact-of-offline-first-on-the-developing-world-8e74253b303d> §  Designing Offline-First Web Apps <http://alistapart.com/article/offline-first> §  The Service Worker Specification <https://github.com/slightlyoff/ServiceWorker> §  Application Cache is a Douchebag <http://alistapart.com/article/application-cache-is-a-douchebag> §  localForage <https://localforage.github.io/localForage/> §  PouchDB <https://pouchdb.com/> §  Apache CouchDB <http://couchdb.apache.org/> §  IBM Cloudant <https://cloudant.com/> §  PouchDB for Ionic Framework <https://github.com/nolanlawson/pouchdb-ionic> §  PouchDB for Electron (formerly Atom Shell) <https://github.com/nolanlawson/pouchdb-electron> §  Quick demo of PouchDB running on a Tessel <https://github.com/nolanlawson/tessel-pouchdb-demo> §  Apache Cordova <https://cordova.apache.org/>
  65. Resources (cont'd) §  Ionic <http://ionicframework.com/> §  Electron <http://electron.atom.io/> §  Tessel

    2 <https://tessel.io/> §  Cloudant Sync iOS datastore library <https://github.com/cloudant/CDTDatastore> §  A JSON-based document datastore for Android applications <https://github.com/cloudant/sync-android> §  Hoodie <http://hood.ie/> §  Scaling Offline First with Envoy <https://medium.com/offline-camp/scaling-offline-first-with-envoy-ada42d130cfc> §  Introducing Cloudant FoodTracker: An Offline-First App <https://developer.ibm.com/clouddataservices/2015/11/10/introducing-cloudant-food-tracker-an-offline-first-app/> §  Field Work <https://github.com/ibm-cds-labs/fieldwork> §  Location Tracker – Part 1 <https://developer.ibm.com/clouddataservices/2016/06/14/location-tracker-part-1-offline-first/> §  Crafting community events that leave them wanting s’more <https://medium.com/offline-camp/crafting-community-events-that-leave-them-wanting-smore-902974cff4d4> §  Offline Camp on Medium <https://medium.com/offline-camp> §  Offline Maps: A Shared Problem in Need of a Shared Solution <https://medium.com/offline-camp/offline-maps-a-shared-problem-in-need-of-a-shared-solution-c050883f0be8> §  Building the Offline First Community <https://medium.com/offline-camp/building-the-offline-first-community-f496b86cc589> §  Next steps: Building the Offline First community through face-to-face events <https://medium.com/offline-camp/building-the-offline-first-community-through-face-to-face-events-8364408868d4>
  66. Resources (cont'd) §  Offline/Low-bandwidth UX Design Patterns <https://medium.com/offline-camp/offline-low-bandwidth-ux-design-patterns-51391230a79e> §  Offline

    First, the Decentralized Web, and Peer-to-Peer Technologies <https://medium.com/offline-camp/offline-first-the-decentralized-web-and-peer-to-peer-technologies-b05b7fb3bcdd> §  Let’s Talk about Tooling <https://medium.com/offline-camp/lets-talk-about-tooling-8c0c827bae87> §  Notifications and Alerts for an Offline First World <https://medium.com/offline-camp/notifications-and-alerts-for-an-offline-first-world-30aae486873c> §  Security in Offline First Apps <https://medium.com/offline-camp/offline-first-security-59bf4800e82a> §  Offline First Chat <http://offlinefirst.org/chat/> §  Offline Camp on Twitter <https://twitter.com/OfflineCamp> §  SXSW PanelPicker: From Mobile First to Offline First <http://panelpicker.sxsw.com/vote/60232>
  67. Image Credits §  Thin Client — OpenVMS by Leonardo Rizzi, on Flickr

    (CC BY-SA 2.0). §  the iOS family pile (2015) by Blake Patterson, on Flickr (CC BY 2.0). §  Screen size visualisation by Orde Saunders, on Flickr (CC BY 2.0). §  fluffy chaos by xdxd_vs_xdxd, on Flickr (CC BY-SA 2.0). §  Device landscape by Jeremy Keith, on Flickr (CC BY 2.0). §  Cell phone tower by Gary Lerude, on Flickr (CC BY-ND 2.0). §  Pneumatic Central by Sleestak, on Flickr (CC BY 2.0). §  Cloud Formation Over the Adirondacks by Bradley Holt, on Twitter. §  Money by thethreesisters, on Flickr (CC BY 2.0). §  Los Angeles Downtown by Aydin Palabiyikoglu, on Flickr (CC BY 2.0). §  workstation by Stev Ngo, on Flickr (CC BY 2.0). §  No Signal by Steve Hodgson, on Flickr (CC BY-SA 2.0). §  Waterfall by Paulo Valdivieso, on Flickr (CC BY-SA 2.0). §  Progressive Web App, le futur du Web au #axawebcenter @hsablonniere #nativeVsWeb #serviceworker #offline1st #sketch http://bit.ly/1TA7IvM by flexbox, on Flickr (CC BY 2.0). §  Service Workers fetch diagram by Mozilla Contributors (CC-BY-SA 2.5). §  Tessel 2 by SparkFun Electronics, on Flickr (CC BY 2.0). §  database by Tim Morgan, on Flickr (CC BY 2.0). §  A mockup of the golden Apple iPhone 5S by Zach Vega, on Wikimedia Commons (CC BY-SA 3.0). §  փఽ࢏ Sensors by Lei Gao, on Flickr (CC BY-SA 2.0). §  Offline Camp location by Bradley Holt, on Twitter. §  Swimming Pool at The Lodge at the Oak Creek Ranch (courtesy of The Lodge at the Oak Creek Ranch).