Example from http://thejackalofjavascript.com/an-end-to-end-hybrid-app/