Blog

Category Filtering: 'websql'

26
May 2015

Gavin Pickin

A quirk of Cross Platform WebSQL in Hybrid Mobile Development for iOS Android and Windows

Android, Cordova / Phonegap, Ionic, Javascript, Mobile Development, Techie Gotchas, WebSQL

When is WebSQL not compatible across devices? This is really a quick question, as if you recall reading in previous blog posts ( if you haven’t read them, I urge you to ) I am using WebSQL for my hydrib mobile app development with Phonegap and Cordova… and although WebSQL is supported on Android and iOS, it is not natively supported on Windows Phones / Devices. That is where the lovely people at MS OpenTech come in, Microsofts Open Source company, which wrote a WebSQL wrapper for SQLite to allow you to work with SQLite like you would WebSQL. FANTASTIC, until you hit those issues… so lets look at a couple of them.

05
March 2015

Gavin Pickin

Did you turn it off and on again? Troubleshooting Gotchas with Cordova and WebSQL

Chit Chat, Mobile Development, Techie Gotchas, WebSQL

If you have not seen IT Crowd, you are missing out on some strange but funny geek culture... and one of the highlights of that show is the line, "Did you turn it off and on again". Sometimes with troubleshooting, the simple things can throw you off, and that happened with me recently, so I wanted to share my frustration. This might not be the most informative post, but hopefully it helps someone, so they don't shoot themselves, like I was tempted to do so.

03
March 2015

Gavin Pickin

Loading or Dumping Large Amounts of Data into WebSql - Options with Performance Numbers

Javascript, Mobile Development, WebSQL

Working with databases, there is going to be a time when you need to dump large amounts of data out of, or into your database. Dumping data out, has always been pretty easy, but what about inserts? We’ll look at a couple of solutions, and a couple of issues, and see what seems to be the best solution.

17
February 2015

Gavin Pickin

WebSQL - When is a Javascript Object not a Javascript Object?

Cordova / Phonegap, Javascript, Mobile Development, Techie Gotchas, WebSQL

After a short break from WebSQL, I am back to talk to you about WebSQL again, as I continue my work on my Cordova / Phonegap cross platform app. Today I ran into one of those Gotchas, that cost me a couple hours of time trying to debug a strange happening in my app. It is one of those things in our developers lives, if you only knew what you didn’t know, you'd know more than you know now. In finding this gotcha, I remembered a couple of other lessons when using Web Developer tools, which you may or may not know… so I’ll share those too.

11
February 2015

Gavin Pickin

How to Work with WebSQL and Managing Multiple Deferred and Promises

Javascript, jQuery, Techie Gotchas, WebSQL

My last post with WebSQL looked at the difference between sync and async, and how you can use Deferred and Promises. The example I showed was a simple query, so we create a deferred, run the query, when the query is completed, it resolves the deferred… and our $.when is waiting for that to complete to move on. That works great in this simple situation, what if you have to loop through 50 items, and have to update each one, and after all of them have done, you want to query the list and display those updates… how do we do that? Its easier than you think. I searched over several blogs and stack overflow questions, API docs, and got it working. I thought you would love a step by step simple example to solve this problem, so here it is.

31
January 2015

Gavin Pickin

Using WebSQL - Pulling Data - Start Thinking Async vs Sync

Javascript, WebSQL

In today's post on WebSQL, I’m going to show you how I had to refactor my application, to move from sync LocalStorage functions and storage, over to using WebSQL, which has an ASYNC API for transactions. In the last few posts, I have gone over why I chose WebSQL for this Application, and how to get Started with WebSQL etc, and had to post a correction to some assumptions I had made, so now we’re ready to move on and get some data out of the db, and thrown into our application.

30
January 2015

Gavin Pickin

Pre-mature Optimization - Pre-mature Blog - Gotcha WebSQL Open Database

Javascript, Techie Gotchas, WebSQL

I have written a few posts so far about WebSQL, why I like it, especially in this cross platform Cordova / Phonegap App development world, and a getting started post, where I was wrong. Yes, I Pre-maturely posted that Blog, so this is me fixing it, of course, I edited the original post right away, but here, I’ll go into what I stated wrong, and how it took me way too long to figure out I was wrong, and how sometimes Pre-mature Optimization isn’t needed, but sometimes, it will help show you how wrong you were.

22
January 2015

Gavin Pickin

Using WebSQL in my Mobile App - Lessons learned - The hard way

Javascript, Mobile Development, WebSQL

I have been working on my Multiple Platform App, using WebSQL for bigger storage needs, instead of simple Locale Storage, in which my App started with. My last blog post walked us through opening a db connection with WebSQL, creating tables, inserting data, inserting data and protecting your app from SQL Injection using placeholders, and the 2 types of transactions, .transaction() which locks the db, and .readTransaction() which does not lock the whole db, and can only be used for ready only sql… as the name suggests.

Of course, the more you dig into something, the more you learned, and I think I learned a few important things to share.
And Yes, that title is beyond a little dramatic.

22
January 2015

Gavin Pickin

Getting Started with WebSQL in your Mobile App

Android, IOS, Javascript, Mobile Development, WebSQL

In my last Blog Post, I discussed an App I was building, and how it changed target from Windows 8, to iOS to Android, and back to Windows 8, and thanks to MS Open Tech, the Microsoft Open Source company, I could use the WebSQL API to talk to WebSQL on iOS and Android, and with the plugin, SQLite on Windows 8.

This post will give you the basics of actually creating a DB Connection, creating a table, and making a couple of queries against it.

Blog Search