28 Nov 2012, 10:32

Offline first, a better (html5) user experience

Interesting blog post about offline management in web apps and why it becomes now a required feature and how to make your app "offline" compliant: Offline first, a better (html5) user experience


  1. Decouple your app from the server
    1. Make sure client side app is not reliant on server side code to produce the minimum viable experience. It should be able to at least render something to say that no data is available.
    2. Communicate using JSON
  2. Create an API wrapper object in client side code
    1. Abstract JSON API into an object
    2. Don’t litter your app code with direct AJAX calls and callbacks
  3. Decouple data updates from data storage
    1. Use a data controller object to store and schedule updates
    2. Make all requests for data via this proxy object

What I find relevant from this article :

  • HTML5, especially with the localStorage and Application Cache and Local Storage can improve web apps and the way we develop them
  • Web developers needs to change their paradigm from "always connected" to integrate offline mode (where as app dev are more used to offline mode and think in a 2nd mode to online mode ;-) )
  • Paradigm shift where server provides only a API and that logic will no longer be on server side but on client side. It also explains the recent rise of Javascript and especially MVC Framework in Javascript like AngularJS or BackboneJS.

Any experience or feedback to share on this?