ET1 Native HTML 5 and SQL Lite

Does anyone know how to get SQL Lite running through the native browser for those interested in HTML 5 development but not Rho Elements?

Robert Galvin
You can install Opera Mobile

You can install Opera Mobile 11.5 (not Opera mini, download it from Amazon app store), it claims to have WebSQL support, but as with all browsers, I would urge to do a through review, each one has it's nuances. I would be interested in hearing why RhoE is not an option. Send me a PM.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Darryn Campbell
I've got an html sample that

I've got an html sample that proves that Web SQL is indeed supported by the native browser on the ET1. It’s not pretty, but it is effective. This sample which (to the best of my ability) appears to be functioning correctly with the Native browser, Opera, Dolphin, Chrome (on the PC)  and RhoElements.

I ran another test with code structured with SQLite that would only work on an android device with Opera or RhoElements.

Bottom line - the Native browser on ET1 (or any other gingerbread android device that I could get hands on for that matter) supports WebSQL from what I can tell - not SQLite....

Now - if I can only figure out how to attach the samples files here, that would be great - (Any help Rob?). Larry - I'll send that sample to you directly.

See the following posts for additional detail.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Adithya Krishna...
Kevin -- to attach a file,

Kevin -- to attach a file, hit Reply and click on 'Use Advanced editor' link on the top right-hand side of the Edit window (above Spellcheck and HTML icons). You will see a text box with a Browse button to attach files there.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robin West
When you reply just select

When you reply just select advanced editor which allows you to attach files

Connected by DROID on Verizon Wireless

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Adithya Krishna...
Attaching files on behalf of

Attaching files on behalf of Kevin.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Adithya Krishna...
Kevin -- I have heard from a

Kevin -- I have heard from a few others as well that they were unable to see the Attach files option in Advanced editor mode. We will raise this issue with Jive Tech support.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kevin Lollock
OK - for those of you that

OK - for those of you that are interested, here's a summary of what I've found and tested on SQL support within a browser...

WebSQL was deprecated from the W3C working standard as of November 18th 2010 however all the common HTML5 browsers (Native, Dolphin, Opera, RhoElements, Safari, Chrome, etc...) still support it. WebSQL was based on SQLite but all SQLite calls and functions were never intended to be fully baked in WebSQL. See http://www.w3.org/TR/webdatabase/ for more details. The sample attached above (dbtestWebSQL) is a sample html page that can run locally on the device and be used to illustrate the usage of local store functionality within WebSQL.

Even though work on WebSQL has been stopped, W3C is re-visiting getting database functionality back in the standard, W3C has a working group on Indexed Database as a planned part of the standard to supersede WebDB. This is a relatively new approach and has yet (as of this wirting) to make it into any release of browser. See http://www.w3.org/TR/IndexedDB/ for more details.

SQLite on the other hand is an extended browser feature set beyond the bounds of W3C. From a mobile device standpoint, RhoElements, Opera, and Safari support SQLite functionality. The file attached above (dbtestSQLite) illustrates SQLite functionality when run under an SQLite enabled browser. NOT ALL BROWSERS (native or dolphin) support SQLite. Chrome on the desktop does... To illustrate that, load the sample above and try to run it under the native browser on the ET1. It appears to accept data and does not generate any error (as any good site should) but it really does not support the database call. Run it on your desktop with Chrome - it works just fine. To see it really work in a mobile device, download RhoElements to your ET1 (or other MCxx supported by RhoElements) and viola - SQLite support! By the way, the same sample works on an iDevice (Safari) or on the Android platform with Opera (not Opera Lite)... The native android browser on the gingerbread track does not support SQLite directly.

But... (you and/or your customers might ask)... I thought Android has native support for SQLite? WTF? Well, yes it does - Android, that is - NOT THE NATIVE BROWSER (at least from what I can find up to and including the Gingerbread track). The packages android.database and android.database.sqlite have been part of the builds since API level1 (the original build of Android). Android uses SQLite extensively for all of its internal workings. See http://developer.android.com/reference/android/database/package-summary.html for more details … The calls have existed since day 1. There may be/have been variants of the native browser that supported this functionality however, I cannot find any reference to support of SQLite within any native browser release.

Now - you might think about doing some additional checking, (http://whatsmyuseragent.com ) reports that the device user agent is Mozilla/5.0 (Linux; Android 2.3.4; blablabla ) AppleWebKit 533.1… That of which is supposed to support web sql. Now – according to what I can find on http://caniuse.com that web sql database is supported by native android browsers starting at v2.1 and should be supported up to 4.0. Going to http://html5test.com with the ET1 indeed indicates that the native browser reports that SQL database is supported. The same results on the ET1 as on my Android phone or my android tablet… No queries report the type of database support provided by the browser. No mention however of SQLite support in any of these queries.

Bottom line - Not all DB functionality is implemented equally! WebSQL is not SQLite. Only certain browsers support SQLite functionality.Android does have native support for SQLite but it is not extended in the default browser. Don't fall into the trap where a customer/partner goes to any of the test sites mentioned above which reports that the browser supports DB functionality under HTML5 - It's WebDB only that those sites seem to test for. If the customer is trying to compare apples to androids remember that safari supports SQLite and native android does not. Go Rho if you can (Opera if you're in a pinch).

RhoElements solves the issue of SQLite support for web apps by providing a true "Corporately Supported" rendering engine enabling SQLite functionality in web-based applications and is designed to support the enterprise!

I would welcome anyone's comments/or corrections!

Thanks,

Kevin

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Robert Galvin
Nice write up Kevin.

Nice write up Kevin.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
Just some further

Just some further clarification on this topic:

localStorage does not equal WebSQL or SqlLite.

localStorage is a HTML5 feature that allows the application to be in full control of name/value pairs. In a sense it is kind of like traditional "cookies", but instead of letting the browser control cookie existance/sandboxing etc, the application is in control of localStorage name/value pairs.

WebSql/SQLlite goes well above and beyond that by providing full CRUD database operations for a structured database that has a typical SQL definition of Fields.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments