In recent months I’ve been experimenting with different stacks to find my preferred solution for building mobile (hybrid) apps. I’ve been itching to move away from jQuery Mobile for a while to something a little lighter but more structured. AngularJS seemed a perfect fit.
Taking our existing jQuery mobile todo app we going to swap our WebSQL storage for Local Storage without rewriting our main app.js file.
Welcome back, last time in my previous post we created our web-sql-storage.js object which enables us to abstract storage methods away from our main app meaning that, should in the future we decide to use a different storage mechanism we can do so without rewriting our main app.js file.
So lets begin by thinking about the Javascript thats going to power the app. We’ll start by creating our web-sql-storage.js file. Then we’ll add the initialize database method, which is going to open/create the database, add some sample data and include a success and error callback.
This is the first in a series of ongoing blog posts exploring different JavaScript frameworks mainly from a mobile dev point of view. I thought it best to start with something fairly simple, something we can build upon and make comparisons against and what better way to do that than a tried and tested simple todo app.