Your SlideShare is downloading. ×
Indexed DB
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Indexed DB

5,817
views

Published on

A refresher on IndexedDB, how the API evolved from its initial versions. …

A refresher on IndexedDB, how the API evolved from its initial versions.
Example of LINQ on IndexedDB, IndexedDB-Jquery Plugin and some requirements from IndexedDB

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,817
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
28
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. IndexedDB
    Designing the API
  • 2. Long time ago, in a galaxy far far away …
  • 3. Applications
    Partially Connected Applications
    Can work offline also
    Email, Calendar, Source Control ?
    Offline Applications
    No connection to the internet required
    Word processors, todo lists
    Data Caches
    Privacy, Save bandwidth,
    Shopping carts, user preferences
  • 4. IndexedDB Example
    ... IndexedDB refresher...
    http://yourwebpage.com
    Database
    Database
    ObjectStore
    Index
    Index
    key : value
    search
    key : value
    Cursor on Index
    Cursor on Index
    ObjectStore
    key : value
    key : value
    Cursor on Object Store
    Cursor on Object Store
    key : value
    key : value
  • 5. Transactions : Explicit, auto-commit
    Two Flavors
    Async on Main browser thread
    Sync on Web Workers
    ... more star wars like text ...
  • 6. Cookies –
    Limited storage, key value pairs
    and the cookie monster
    Local Storage
    Not a database, don’t fake it
    … days of the old republic …
  • 7. ... 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)
    Frozen (ref)
  • 8. … the birth of a hero …
    WebSimpleDB
    ISAM based store – influenced by Berkley DB
    Concepts of Entity Store, Indexes, Cursors
    Most APIs were synchronous
    Async models – function callbacks
    Entity Joins, Sequences and Queues
  • 9. Implemented in Chrome 12, Firefox 4.0, IE10
    Uniform Requests API
    Concrete Asynchronous API
    Use Structured Cloning Algorithm
    the dojo
    http://nparashuram.com/ttd/IndexedDB/index.html
    … the force is strong with this one.…
  • 10. Microsoft and Mozilla bless the youngling
    Concept of requests introduced
    Security concerns addressed
    Authorization section
    Privacy Section
    No more joins, sequences, queues
    Explicit transactions
    … young hero shows promise…
  • 11. Come over to the dark side*
  • 12. … encountering the Sith Lord …
    NoSQL
    Really ?
    No, No SQL
    So what should I do for querying ?
    You got Cursors, Indexes
    But complex joins ? NoSQL ?
    Build something on top, we need least common denominator
    Fine, here is what I’ve done
    SHOW ME
    … Stop talking you will …
  • 13. … what a piece of junk! …
    Language Integrated Query Language
    Sounds like english –
    from table in database, select something when some condition and order by something.
    Why NoSQL ?
    Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaghhhh

    Just an experiment, how about we team up and write a SQL wrapper on this and see how it looks like?
    http://nparashuram.com/IndexedDB/LINQ/index.html
  • 14. …the ability to speak doesn't make you intelligent …
    Syntax looks verbose
    I no Javascript, can I hazJquery?
    IndexedDB Wrapper on Javascript
    Less verbose with use of promises, implicit operations
    http://nparashuram.com/IndexedDB/jquery/index.html
  • 15. … i find your lack of faith disturbing…
    Multi Column Indexes – aka Joins
    Perform union and intersection in JS ?
    Full Text Search
    Proposed, but punted to next version
    DB rollback
    Versions supported, but no DB version revert
    Change Tracking and Sync with Server
    I need to contact my mothership–the USS enterprise
  • 16. … always in motion is the future …
    No DOM interaction
    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
  • 17. May the force be with you
    http://nparashuram.com/IndexedDB
    @nparashuram
    http://nparashuram.com