This is a hodgepodge of parts and techniques I admit AND they have worked for many projects. This has been the foundation of prototypes all the way to projects wrapped in Cordova deployed in app stores.