8.
//// OPEN LOCAL DATABASE
var db;
if (window.openDatabase)
db = openDatabase("as_note", "1.0", "AS Note", 200000);
//// DO A SELECT
db.transaction(function(tx) {
tx.executeSql("SELECT id, note FROM MyTable WHERE id = ?",
[27], function(tx, rs) {
for (var i = 0; i < rs.rows.length; ++i) {
/* ... */
renderNote(rs.rows.item(i));
}
}, function(tx, error) {
/* ... */
});
});
9.
//// CREATE TABLE IF NOT EXISTS
function init()
{
db.transaction(function(tx) {
tx.executeSql("SELECT COUNT(*) FROM MyTable", [],
function(result) {
doSomething();
}, function(tx, error) {
tx.executeSql("CREATE TABLE MyTable (
id INTEGER PRIMARY KEY,
note TEXT,
timestamp REAL)", [],
function(rs){
doSomething();
});
});
});
}
10.
Mobile Safari
24/10/2009
Little web app
- Write notes
- Localize them
- Do it offline
- Take your iPhone : http://note.antistatique.net
www.antistatique.net 10
11.
Mobile Safari
24/10/2009
Further development
- Account system
- Server synchronisation
www.antistatique.net 17
12.
Mobile Safari
24/10/2009
Benefits of webApps
- Easy to develop, update
- No install required
- Apple free ~
www.antistatique.net 18
13.
Mobile Safari
24/10/2009
Backwards
- Interactions with native apps
- Animation
- More
www.antistatique.net 19
14.
Mobile Safari
24/10/2009
Sources
- http://developer.apple.com/
- Safari and iPhone
- http://dev.w3.org/geo/api/spec-source.html
- Geolocation API Specification
- http://www.w3.org/TR/offline-webapps/
- Offline Web Applications
- http://www.jqtouch.com/
- plugin for mobile web development on the iPhone,
Android, Palm Pre
www.antistatique.net 20
Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.
Be the first to comment