ola gasidlo
play

Ola Gasidlo - Developer for +10 years - Core Member of Hoodie - - PowerPoint PPT Presentation

Say Hello To Offline First How to build applications for the real world we <3 GOTOBerlin Ola Gasidlo - Developer for +10 years - Core Member of Hoodie - Co-Organizer of OTSConf && RejectJS twitter: @misprintedtype Agenda 1. What


  1. Say Hello To Offline First How to build applications for the real world we <3 GOTOBerlin

  2. Ola Gasidlo - Developer for +10 years - Core Member of Hoodie - Co-Organizer of OTSConf && RejectJS twitter: @misprintedtype

  3. Agenda 1. What & why? 2. Problems 3. New approach 4. Implementation @misprintedtype

  4. What & why? @misprintedtype

  5. The internet turned 25 last year! @misprintedtype

  6. We grew up. @misprintedtype

  7. @misprintedtype

  8. amount of mobile-only web users is out of reach @misprintedtype

  9. Tell me... @misprintedtype

  10. @misprintedtype

  11. Problems @misprintedtype

  12. @misprintedtype

  13. @misprintedtype

  14. offline > error handling @misprintedtype

  15. inform user @misprintedtype

  16. @misprintedtype

  17. build trust @misprintedtype

  18. http://branch.com/b/redesigning-the-save-symbol-let-s-do-this

  19. http://branch.com/b/redesigning-the-save-symbol-let-s-do-this

  20. organise data @misprintedtype

  21. @misprintedtype

  22. decide @misprintedtype

  23. @misprintedtype

  24. @misprintedtype

  25. @misprintedtype

  26. @misprintedtype

  27. ? @misprintedtype

  28. @misprintedtype

  29. @misprintedtype

  30. @misprintedtype

  31. @misprintedtype

  32. @misprintedtype

  33. ? @misprintedtype

  34. ? @misprintedtype

  35. ? @misprintedtype

  36. @misprintedtype

  37. ? @misprintedtype

  38. @misprintedtype

  39. New Approaches @misprintedtype

  40. Rethink! (but how?) @misprintedtype

  41. http://hood.ie

  42. Implementation @misprintedtype

  43. files data

  44. files data

  45. Manifest @misprintedtype

  46. App Cache is a douchebag! http://alistapart.com/article/application-cache-is-a-douchebag

  47. App Manifest 1. Files always come from the cache (also if you are online!) @misprintedtype

  48. App Manifest 2. App Cache only updates if manifest changed @misprintedtype

  49. App Manifest 3. App Cache is an additional cache @misprintedtype

  50. App Manifest 4. Non-cached resources will not load @misprintedtype

  51. App Cache nanny https://www.npmjs.org/package/appcache-nanny @misprintedtype

  52. Wor k i t ! @misprintedtype

  53. Web wha t ?! @misprintedtype

  54. web worker - HTML5 feature - runs JS in browser @misprintedtype

  55. @misprintedtype

  56. UI Events large API data DOM @misprintedtype

  57. @misprintedtype

  58. async !== concurrency @misprintedtype

  59. @misprintedtype

  60. @misprintedtype

  61. @misprintedtype

  62. @misprintedtype

  63. Encoding && decoding large strings Complex mathematical calculations Prefetching && caching data @misprintedtype

  64. Network requests Manipulation on localStorage Image manipulation @misprintedtype

  65. real - time text analysis processing video or audio data Polling web services @misprintedtype

  66. 
 // worker.js - no access // window 
 window.alert(`Work it!`); // document 
 document.getElementById(`danceParty`); // parent 
 window.globalFunction(); @misprintedtype

  67. no libs depending on these objects, for example @misprintedtype

  68. @misprintedtype / @lewiscowper

  69. 
 // worker.js // navigator 
 navigator.onLine; // location 
 location.href; // xhr 
 xmlhttp.send(); @misprintedtype

  70. 
 // worker.js // appCache 
 applicationCache.status; // import 
 import `worker-script`; @misprintedtype

  71. @misprintedtype / @lewiscowper

  72. Web worker s - amazing litte helpers @misprintedtype

  73. 2 t yq e s of worker s - dedicated workers - shared workers @misprintedtype

  74. dedicate d worker @misprintedtype

  75. share d worker @misprintedtype

  76. 
 // available? function areWorkersAvailable() { return !!window.Worker; } @misprintedtype

  77. 
 // run worker run! // app.js 
 var worker = new Worker(`task.js`); @misprintedtype

  78. @misprintedtype

  79. ? @misprintedtype

  80. 
 dem o // map.js 
 http://slides.html5rocks.com/#web-workers @misprintedtype

  81. 
 mor e dem ot // examples.js 
 http://greenido.github.io/Web-Workers-Examples-/ @misprintedtype

  82. @misprintedtype / @lewiscowper

Recommend


More recommend