SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Client Side Storage
                  Star wars style
                  


     WebSQL and
     IndexedDB
Long time ago, in a galaxy far
far away …
… days of the old republic …

 • Cookies –
   – Limited storage, key value pairs
 • Local/Session Storage
   – Store {Key,Value} pairs
   – Iterate over values
   – Synchronous, no transactions
   – Not a database, don‟t fake it
... restoring balance to the force ...

  • Google Gears:Database module
    – First release: 2007-05-31
    – Database API based on SQLite – built in DB


  • Web Database API
    – Dialect of SQLite 3 (ref)
    – Deprecated (ref)
... WebSql refresher...
 IndexedDB Example
           http://yourwebpage.com                                            search




                       Database                   Database

                     Transactions              Transactions

                                      Create table bookShop (key
                                      varchar(255), value varchar(255))

                                      Insert into bookShop values (“name”,
                                      “desc”)

                                      Drop table bookShop
                     SQLite Dialect
                                      Select * from bookShop where name =
                                      „name‟;
... an apprentice to a master ...
... an apprentice to a master ...

 • Powerful query capabilities
 • Familiar SQL syntax, easy for developers
 • Already supported by browsers, no better
   alternative.

    “User agents must implement the SQL
      dialect supported by Sqlite 3.6.19”
... Denying the destiny ...
... Denying the destiny ...
Come over to the dark side*
… the birth of a hero …

  • WebSimpleDB
    – ISAM based store – influenced by Berkley DB
    – Concepts of ObjectStores, Indexes, Cursors
    – Most APIs were synchronous
    – Async models – function callbacks
    – No SQL
… the force is strong with this one.…

  • Mozilla, Microsoft Bless youngling
    – Implemented in Chrome 12, Firefox 4.0, IE10
  • Simple implementation for browsers
    – Basic concepts like transactions
    – Async and Sync APIs
    – Libraries to enhance capabilities
... IndexedDB refresher...
 IndexedDB Example
           http://yourwebpage.com                                           search




                     Database                            Database

        Object Store                            Object Store

        key : value                  Index      key : value         Index
        key : value                             key : value
                                    Cursor on                   Cursor on
        key : value                  Index      key : value      Index

         Cursor on                               Cursor on
        Object Store                            Object Store
Demo time
… what a piece of junk! …
 • Specification still evolving
   – setVersion vs onupgradeneeded
   – IDBTransaction.READ_ONLY vs “readonly”
   – Mostly done, now the browsers need to catch
     up
 • No SQL
 • Verbose syntax – requests vs promises
… the alliance …
 • https://github.com/axemclion/jquery-
   indexeddb
 • http://linq2indexeddb.codeplex.com/
 • https://github.com/superfeedr/indexeddb-
   backbonejs-adapter
 • https://github.com/philikon/queryIndexedD
   B
 • http://gazeljs.org/
 • http://aaronpowell.github.com/db.js/
… for the rest of us …
… for the rest of us …
... The grand plan …
… The grand plan …
   - IndexedDB Shim over WebSql
      - http://nparashuram.com/IndexedDB/polyfill
   - WebSql shims over Flash, etc.

   - Or use the libraries
… the alliance …
… the alliance …
•   Lawnchair
•   persistence.js
•   persistJS
•   amplify.store
•   localStorageDB
•   realStorage
•   YUI3 CacheOffline
•   dojox.storage
•   DomSQL
•   Impel
•   ActiveJS ActiveRecord
•   JazzRecord
•   picnet.data.DataManager
•   ShinyCar
•   Lscache
•   Kizzy
•   Artemia
•   microcache.js
•   Store.js
… always in motion is the future …
 • Impact of ECMA.Next
   –   IndexedDB module
   –   Promises
   –   Iterators, Generators, Yield support
   –   Save binary blobs
   –   De-structuring assignments [x,y] = [1,2]
   –   Classes as Object Schema
http://nparashuram.com/IndexedDB
May the force be with you




        @
        http://nparashuram.com

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to couchdb
Introduction to couchdbIntroduction to couchdb
Introduction to couchdbiammutex
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBJustin Smestad
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Dbchriskite
 
Who's afraid of front end databases?
Who's afraid of front end databases?Who's afraid of front end databases?
Who's afraid of front end databases?Gil Fink
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRailsMike Dirolf
 
Web development basics (Part-1)
Web development basics (Part-1)Web development basics (Part-1)
Web development basics (Part-1)Rajat Pratap Singh
 
JavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for BrowsersJavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for Browsersnoweverywhere
 
Quick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloQuick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloSonja Madsen
 
JavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeJavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeSonja Madsen
 
How Does the Internet Work? (Wix she codes; branch)
How Does the Internet Work? (Wix she codes; branch)How Does the Internet Work? (Wix she codes; branch)
How Does the Internet Work? (Wix she codes; branch)Dina Goldshtein
 
Javascript
JavascriptJavascript
JavascriptMozxai
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017BookNet Canada
 
Quick start guide to java script frameworks for sharepoint apps spsbe-2015
Quick start guide to java script frameworks for sharepoint apps spsbe-2015Quick start guide to java script frameworks for sharepoint apps spsbe-2015
Quick start guide to java script frameworks for sharepoint apps spsbe-2015Sonja Madsen
 

Was ist angesagt? (20)

CouchDB introduction
CouchDB introductionCouchDB introduction
CouchDB introduction
 
.Less - CSS done right
.Less - CSS done right.Less - CSS done right
.Less - CSS done right
 
Introduction to couchdb
Introduction to couchdbIntroduction to couchdb
Introduction to couchdb
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Start using less css
Start using less cssStart using less css
Start using less css
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
Who's afraid of front end databases?
Who's afraid of front end databases?Who's afraid of front end databases?
Who's afraid of front end databases?
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRails
 
Aleact
AleactAleact
Aleact
 
Basic JS
Basic JSBasic JS
Basic JS
 
Web development basics (Part-1)
Web development basics (Part-1)Web development basics (Part-1)
Web development basics (Part-1)
 
JavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for BrowsersJavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for Browsers
 
Quick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins osloQuick start guide to java script frameworks for sharepoint add ins oslo
Quick start guide to java script frameworks for sharepoint add ins oslo
 
JavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeJavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins Cambridge
 
How Does the Internet Work? (Wix she codes; branch)
How Does the Internet Work? (Wix she codes; branch)How Does the Internet Work? (Wix she codes; branch)
How Does the Internet Work? (Wix she codes; branch)
 
CouchDB in The Room
CouchDB in The RoomCouchDB in The Room
CouchDB in The Room
 
Javascript
JavascriptJavascript
Javascript
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017On Again; Off Again - Benjamin Young - ebookcraft 2017
On Again; Off Again - Benjamin Young - ebookcraft 2017
 
Quick start guide to java script frameworks for sharepoint apps spsbe-2015
Quick start guide to java script frameworks for sharepoint apps spsbe-2015Quick start guide to java script frameworks for sharepoint apps spsbe-2015
Quick start guide to java script frameworks for sharepoint apps spsbe-2015
 

Andere mochten auch

Understanding Javascript Engines
Understanding Javascript Engines Understanding Javascript Engines
Understanding Javascript Engines Parashuram N
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceParashuram N
 
Help Wanted: Projections of Jobs and Education Requirements Through 2018
Help Wanted: Projections of Jobs and Education Requirements Through 2018Help Wanted: Projections of Jobs and Education Requirements Through 2018
Help Wanted: Projections of Jobs and Education Requirements Through 2018CEW Georgetown
 
What's It Worth?: The Economic Value of College Majors
What's It Worth?: The Economic Value of College MajorsWhat's It Worth?: The Economic Value of College Majors
What's It Worth?: The Economic Value of College MajorsCEW Georgetown
 
Six Million Missing Jobs: The Lingering Pain of the Great Recession
Six Million Missing Jobs: The Lingering Pain of the Great Recession Six Million Missing Jobs: The Lingering Pain of the Great Recession
Six Million Missing Jobs: The Lingering Pain of the Great Recession CEW Georgetown
 

Andere mochten auch (7)

Understanding Javascript Engines
Understanding Javascript Engines Understanding Javascript Engines
Understanding Javascript Engines
 
ReactJS Code Impact
ReactJS Code ImpactReactJS Code Impact
ReactJS Code Impact
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
 
Help Wanted: Projections of Jobs and Education Requirements Through 2018
Help Wanted: Projections of Jobs and Education Requirements Through 2018Help Wanted: Projections of Jobs and Education Requirements Through 2018
Help Wanted: Projections of Jobs and Education Requirements Through 2018
 
STEM
STEMSTEM
STEM
 
What's It Worth?: The Economic Value of College Majors
What's It Worth?: The Economic Value of College MajorsWhat's It Worth?: The Economic Value of College Majors
What's It Worth?: The Economic Value of College Majors
 
Six Million Missing Jobs: The Lingering Pain of the Great Recession
Six Million Missing Jobs: The Lingering Pain of the Great Recession Six Million Missing Jobs: The Lingering Pain of the Great Recession
Six Million Missing Jobs: The Lingering Pain of the Great Recession
 

Ähnlich wie Client storage

Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Chris Richardson
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataRoger Xia
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Javasunnygleason
 
Accelerating NoSQL
Accelerating NoSQLAccelerating NoSQL
Accelerating NoSQLsunnygleason
 
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...OpenBlend society
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewAntonio Pintus
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 
Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsSteven Francia
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Railsiradarji
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBSean Laurent
 
Rapid prototyping with solr - By Erik Hatcher
Rapid prototyping with solr -  By Erik Hatcher Rapid prototyping with solr -  By Erik Hatcher
Rapid prototyping with solr - By Erik Hatcher lucenerevolution
 
Migrating structured data between Hadoop and RDBMS
Migrating structured data between Hadoop and RDBMSMigrating structured data between Hadoop and RDBMS
Migrating structured data between Hadoop and RDBMSBouquet
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveIBM Cloud Data Services
 
Introduction to Riak and Ripple (KC.rb)
Introduction to Riak and Ripple (KC.rb)Introduction to Riak and Ripple (KC.rb)
Introduction to Riak and Ripple (KC.rb)Sean Cribbs
 

Ähnlich wie Client storage (20)

Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_data
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Java
 
Accelerating NoSQL
Accelerating NoSQLAccelerating NoSQL
Accelerating NoSQL
 
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overview
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS Applications
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Wmware NoSQL
Wmware NoSQLWmware NoSQL
Wmware NoSQL
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
KeyValue Stores
KeyValue StoresKeyValue Stores
KeyValue Stores
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
Rapid prototyping with solr - By Erik Hatcher
Rapid prototyping with solr -  By Erik Hatcher Rapid prototyping with solr -  By Erik Hatcher
Rapid prototyping with solr - By Erik Hatcher
 
Migrating structured data between Hadoop and RDBMS
Migrating structured data between Hadoop and RDBMSMigrating structured data between Hadoop and RDBMS
Migrating structured data between Hadoop and RDBMS
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
Introduction to Riak and Ripple (KC.rb)
Introduction to Riak and Ripple (KC.rb)Introduction to Riak and Ripple (KC.rb)
Introduction to Riak and Ripple (KC.rb)
 
Drop acid
Drop acidDrop acid
Drop acid
 

Kürzlich hochgeladen

JORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdf
JORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdfJORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdf
JORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdfArturo Pacheco Alvarez
 
Mysore Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mysore Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesMysore Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mysore Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
Expert Pool Table Refelting in Lee & Collier County, FL
Expert Pool Table Refelting in Lee & Collier County, FLExpert Pool Table Refelting in Lee & Collier County, FL
Expert Pool Table Refelting in Lee & Collier County, FLAll American Billiards
 
8377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/7
8377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/78377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/7
8377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/7dollysharma2066
 
Turkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdf
Turkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdfTurkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdf
Turkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdfEticketing.co
 
Austria VS France Injury Woes a Look at Euro 2024 Qualifiers.docx
Austria VS France Injury Woes a Look at Euro 2024 Qualifiers.docxAustria VS France Injury Woes a Look at Euro 2024 Qualifiers.docx
Austria VS France Injury Woes a Look at Euro 2024 Qualifiers.docxWorld Wide Tickets And Hospitality
 
Austria vs France David Alaba Switches Position to Defender in Austria's Euro...
Austria vs France David Alaba Switches Position to Defender in Austria's Euro...Austria vs France David Alaba Switches Position to Defender in Austria's Euro...
Austria vs France David Alaba Switches Position to Defender in Austria's Euro...Eticketing.co
 
Italy Vs Albania Euro Cup 2024 Italy's Strategy for Success.docx
Italy Vs Albania Euro Cup 2024 Italy's Strategy for Success.docxItaly Vs Albania Euro Cup 2024 Italy's Strategy for Success.docx
Italy Vs Albania Euro Cup 2024 Italy's Strategy for Success.docxWorld Wide Tickets And Hospitality
 
IPL Quiz ( weekly quiz) by SJU quizzers.
IPL Quiz ( weekly quiz) by SJU quizzers.IPL Quiz ( weekly quiz) by SJU quizzers.
IPL Quiz ( weekly quiz) by SJU quizzers.SJU Quizzers
 
Instruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics Trade
Instruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics TradeInstruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics Trade
Instruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics TradeOptics-Trade
 
France's UEFA Euro 2024 Ambitions Amid Coman's Injury.docx
France's UEFA Euro 2024 Ambitions Amid Coman's Injury.docxFrance's UEFA Euro 2024 Ambitions Amid Coman's Injury.docx
France's UEFA Euro 2024 Ambitions Amid Coman's Injury.docxEuro Cup 2024 Tickets
 
Technical Data | ThermTec Wild 335 | Optics Trade
Technical Data | ThermTec Wild 335 | Optics TradeTechnical Data | ThermTec Wild 335 | Optics Trade
Technical Data | ThermTec Wild 335 | Optics TradeOptics-Trade
 
Real Moto 2 MOD APK v1.1.721 All Bikes, Unlimited Money
Real Moto 2 MOD APK v1.1.721 All Bikes, Unlimited MoneyReal Moto 2 MOD APK v1.1.721 All Bikes, Unlimited Money
Real Moto 2 MOD APK v1.1.721 All Bikes, Unlimited MoneyApk Toly
 
Instruction Manual | ThermTec Wild Thermal Monoculars | Optics Trade
Instruction Manual | ThermTec Wild Thermal Monoculars | Optics TradeInstruction Manual | ThermTec Wild Thermal Monoculars | Optics Trade
Instruction Manual | ThermTec Wild Thermal Monoculars | Optics TradeOptics-Trade
 
Technical Data | ThermTec Wild 650L | Optics Trade
Technical Data | ThermTec Wild 650L | Optics TradeTechnical Data | ThermTec Wild 650L | Optics Trade
Technical Data | ThermTec Wild 650L | Optics TradeOptics-Trade
 

Kürzlich hochgeladen (16)

JORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdf
JORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdfJORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdf
JORNADA 3 LIGA MURO 2024GHGHGHGHGHGH.pdf
 
Mysore Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mysore Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesMysore Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mysore Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
Expert Pool Table Refelting in Lee & Collier County, FL
Expert Pool Table Refelting in Lee & Collier County, FLExpert Pool Table Refelting in Lee & Collier County, FL
Expert Pool Table Refelting in Lee & Collier County, FL
 
8377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/7
8377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/78377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/7
8377087607 ☎, Cash On Delivery Call Girls Service In Hauz Khas Delhi Enjoy 24/7
 
Turkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdf
Turkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdfTurkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdf
Turkiye Vs Georgia Turkey's UEFA Euro 2024 Journey with High Hopes.pdf
 
Austria VS France Injury Woes a Look at Euro 2024 Qualifiers.docx
Austria VS France Injury Woes a Look at Euro 2024 Qualifiers.docxAustria VS France Injury Woes a Look at Euro 2024 Qualifiers.docx
Austria VS France Injury Woes a Look at Euro 2024 Qualifiers.docx
 
Denmark Vs Serbia Haaland Euro Cup CPR Drive Incident.docx
Denmark Vs Serbia Haaland Euro Cup CPR Drive Incident.docxDenmark Vs Serbia Haaland Euro Cup CPR Drive Incident.docx
Denmark Vs Serbia Haaland Euro Cup CPR Drive Incident.docx
 
Austria vs France David Alaba Switches Position to Defender in Austria's Euro...
Austria vs France David Alaba Switches Position to Defender in Austria's Euro...Austria vs France David Alaba Switches Position to Defender in Austria's Euro...
Austria vs France David Alaba Switches Position to Defender in Austria's Euro...
 
Italy Vs Albania Euro Cup 2024 Italy's Strategy for Success.docx
Italy Vs Albania Euro Cup 2024 Italy's Strategy for Success.docxItaly Vs Albania Euro Cup 2024 Italy's Strategy for Success.docx
Italy Vs Albania Euro Cup 2024 Italy's Strategy for Success.docx
 
IPL Quiz ( weekly quiz) by SJU quizzers.
IPL Quiz ( weekly quiz) by SJU quizzers.IPL Quiz ( weekly quiz) by SJU quizzers.
IPL Quiz ( weekly quiz) by SJU quizzers.
 
Instruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics Trade
Instruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics TradeInstruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics Trade
Instruction Manual | ThermTec Hunt Thermal Clip-On Series | Optics Trade
 
France's UEFA Euro 2024 Ambitions Amid Coman's Injury.docx
France's UEFA Euro 2024 Ambitions Amid Coman's Injury.docxFrance's UEFA Euro 2024 Ambitions Amid Coman's Injury.docx
France's UEFA Euro 2024 Ambitions Amid Coman's Injury.docx
 
Technical Data | ThermTec Wild 335 | Optics Trade
Technical Data | ThermTec Wild 335 | Optics TradeTechnical Data | ThermTec Wild 335 | Optics Trade
Technical Data | ThermTec Wild 335 | Optics Trade
 
Real Moto 2 MOD APK v1.1.721 All Bikes, Unlimited Money
Real Moto 2 MOD APK v1.1.721 All Bikes, Unlimited MoneyReal Moto 2 MOD APK v1.1.721 All Bikes, Unlimited Money
Real Moto 2 MOD APK v1.1.721 All Bikes, Unlimited Money
 
Instruction Manual | ThermTec Wild Thermal Monoculars | Optics Trade
Instruction Manual | ThermTec Wild Thermal Monoculars | Optics TradeInstruction Manual | ThermTec Wild Thermal Monoculars | Optics Trade
Instruction Manual | ThermTec Wild Thermal Monoculars | Optics Trade
 
Technical Data | ThermTec Wild 650L | Optics Trade
Technical Data | ThermTec Wild 650L | Optics TradeTechnical Data | ThermTec Wild 650L | Optics Trade
Technical Data | ThermTec Wild 650L | Optics Trade
 

Client storage

  • 1. Client Side Storage Star wars style  WebSQL and IndexedDB
  • 2. Long time ago, in a galaxy far far away …
  • 3.
  • 4. … days of the old republic … • Cookies – – Limited storage, key value pairs • Local/Session Storage – Store {Key,Value} pairs – Iterate over values – Synchronous, no transactions – Not a database, don‟t fake it
  • 5. ... restoring balance to the force ... • Google Gears:Database module – First release: 2007-05-31 – Database API based on SQLite – built in DB • Web Database API – Dialect of SQLite 3 (ref) – Deprecated (ref)
  • 6. ... WebSql refresher... IndexedDB Example http://yourwebpage.com search Database Database Transactions Transactions Create table bookShop (key varchar(255), value varchar(255)) Insert into bookShop values (“name”, “desc”) Drop table bookShop SQLite Dialect Select * from bookShop where name = „name‟;
  • 7. ... an apprentice to a master ...
  • 8. ... an apprentice to a master ... • Powerful query capabilities • Familiar SQL syntax, easy for developers • Already supported by browsers, no better alternative. “User agents must implement the SQL dialect supported by Sqlite 3.6.19”
  • 9. ... Denying the destiny ...
  • 10. ... Denying the destiny ...
  • 11. Come over to the dark side*
  • 12. … the birth of a hero … • WebSimpleDB – ISAM based store – influenced by Berkley DB – Concepts of ObjectStores, Indexes, Cursors – Most APIs were synchronous – Async models – function callbacks – No SQL
  • 13. … the force is strong with this one.… • Mozilla, Microsoft Bless youngling – Implemented in Chrome 12, Firefox 4.0, IE10 • Simple implementation for browsers – Basic concepts like transactions – Async and Sync APIs – Libraries to enhance capabilities
  • 14. ... IndexedDB refresher... IndexedDB Example http://yourwebpage.com search Database Database Object Store Object Store key : value Index key : value Index key : value key : value Cursor on Cursor on key : value Index key : value Index Cursor on Cursor on Object Store Object Store
  • 16. … what a piece of junk! … • Specification still evolving – setVersion vs onupgradeneeded – IDBTransaction.READ_ONLY vs “readonly” – Mostly done, now the browsers need to catch up • No SQL • Verbose syntax – requests vs promises
  • 17. … the alliance … • https://github.com/axemclion/jquery- indexeddb • http://linq2indexeddb.codeplex.com/ • https://github.com/superfeedr/indexeddb- backbonejs-adapter • https://github.com/philikon/queryIndexedD B • http://gazeljs.org/ • http://aaronpowell.github.com/db.js/
  • 18. … for the rest of us …
  • 19. … for the rest of us …
  • 20. ... The grand plan …
  • 21. … The grand plan … - IndexedDB Shim over WebSql - http://nparashuram.com/IndexedDB/polyfill - WebSql shims over Flash, etc. - Or use the libraries
  • 23. … the alliance … • Lawnchair • persistence.js • persistJS • amplify.store • localStorageDB • realStorage • YUI3 CacheOffline • dojox.storage • DomSQL • Impel • ActiveJS ActiveRecord • JazzRecord • picnet.data.DataManager • ShinyCar • Lscache • Kizzy • Artemia • microcache.js • Store.js
  • 24. … always in motion is the future … • Impact of ECMA.Next – IndexedDB module – Promises – Iterators, Generators, Yield support – Save binary blobs – De-structuring assignments [x,y] = [1,2] – Classes as Object Schema
  • 25. http://nparashuram.com/IndexedDB May the force be with you @ http://nparashuram.com