McGivrer's Home

life of french web solution architect

  • Firefox, IndexedDB and versioning

    • 16 Jun 2010
    • 0 Responses
    •  views
    • database firefox indexedDB intialization versioning
    • Edit
    • Delete
    • Tags
    • Autopost

    http://hacks.mozilla.org/2010/06/comparing-indexeddb-and-webdatabase/

     
    This the source of one of the most interresting information about Web future:  Database browser integration.
     
    Here is explain and demonstrate usage of embedded database, and how to manage version changing base on a "version" field, integrated in the database instance and manage by the database engine.
     
    The most demonstrative code sample (extract from the Post) :
    ...
    if (db.version != "1") { db.changeVersion(
    db.version, "1", function(tx) {
    // User's first visit. Initialize database.
    var tables = [ { name: "kids", columns: ["id INTEGER PRIMARY KEY", "name TEXT"]}, 
    { name: "candy", columns: ["id INTEGER PRIMARY KEY", "name TEXT"]}, 
    { name: "candySales", columns: ["kidId INTEGER", "candyId INTEGER", "date TEXT"]} ];
    for (var index = 0; index < tables.length; index++) { 
    var table = tables[index]; 
    tx.executeSql("CREATE TABLE " + table.name + "(" + table.columns.join(", ") + ");");
    } 
    }, null, function() { 
      loadData(db); }); 
    }
    ...
     
    Sample 1 - Database initialization based on database versioning
    This code rock !
    • Tweet
  • OS/web browser : the statistics on mcgivrer.fr !

    • 4 May 2010
    • 0 Responses
    •  views
    • IE browser firefox os statistics web
    • Edit
    • Delete
    • Tags
    • Autopost
    Thanks to Google analytics, this is the statistics for the past year.

    Capture

    Interesting !
    • Tweet
  • About

    Java/J2EE Expert
    Technical Manager
    Web Standard evangelizer

    120786 Views
  • Archive

    • 2012 (12)
      • May (1)
      • April (7)
      • January (4)
    • 2011 (53)
      • December (5)
      • November (1)
      • September (4)
      • August (4)
      • July (5)
      • June (2)
      • May (11)
      • April (11)
      • March (5)
      • February (3)
      • January (2)
    • 2010 (51)
      • December (2)
      • November (2)
      • October (1)
      • September (3)
      • August (8)
      • July (4)
      • June (15)
      • May (3)
      • April (2)
      • March (5)
      • February (5)
      • January (1)
    • 2009 (29)
      • December (1)
      • November (5)
      • October (6)
      • August (1)
      • July (4)
      • June (2)
      • May (1)
      • April (4)
      • March (2)
      • February (1)
      • January (2)
    • 2008 (39)
      • December (1)
      • November (5)
      • October (8)
      • September (8)
      • August (8)
      • July (9)

    Get Updates

    Follow this Space »
    You're following this Space (Edit)
    You're a contributor here (Edit)
    This is your Space (Edit)
    Follow by email »
    Get the latest updates in your email box automatically.
    Loading...
    Subscribe via RSS
    FlickrPicasametaweblog