Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sencha sqlite example

I would like to see a decent example of a mobile web app using the Sencha framework with a client side DB accessed with SQLite. I'm currently digesting JqTouch and kinda get the binding method used there from reading Jonathon Stark's "iPhone apps" book, but cant find any examples of accessing Senchas features ie listed elements with SQLite. The DB will be small; 30 records, with about 5 fields, mostly numeric, a few of them calculated. All the math is done in javascript and I have that part working (in dash code). I need to add, delete, and edit the records.

Any pointers or examples would be very much appreciated. I'm an old dog trying to learn new tricks. Thanks

like image 243
aflyfishr Avatar asked Sep 14 '10 21:09

aflyfishr


1 Answers

Sencha is client-side Javascript, so your application actually runs on top of Safari. That means you can forget about accessing (or installing) your own SQLite database from within the browser sandbox.

Having said that, you want to learn some new tricks, so why dont you read up on localStorage and DOM Storage. Basically the HTML5 specification allows for offline database storage based on SQLite (imagine relational database cookies). There is 1 per domain and they can be up to 5MB in size. I believe the iPhone supports this as well.

HTML5 Database Functionality in iPhone

Here are some links: Introduction some API Information and a nice little blog entry by a chap called Ben Lister

like image 97
Steven de Salas Avatar answered Oct 11 '22 19:10

Steven de Salas