W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

IndexedDB events for object storage add, put and delete

From: Miko Nieminen <miko.nieminen@iki.fi>
Date: Tue, 5 Feb 2013 20:15:42 +0000
Message-ID: <CAPp4HtB1jKi0qVaHC4+=KkZafByLX_CVLoB6d9kE8KM98HTFsA@mail.gmail.com>
To: public-webapps@w3.org
Hi,

I'm new to this forum and I'm not completely sure if I'm posting to right
list. I hope I am.

I've been playing with IndexedDB to learn how to use it and around this
experiment I wrote a blog article about my experiences.

While writing my article, I realized there is no way to add event listeners
for object store to get notifications when new object is added, existing
one is modified or one is deleted. I think lack of these events makes some
use cases much more complicated than one would hope. Use cases like keeping
local data in sync with remote database, synchronizing views between
multiple windows or creating generic data indexers or manipulation
libraries. I know there are ways to go around the lack of these events, but
having those would make things much easier.

Is there any reason why these are not included in the specification? It
just feels bit strange when similar mechanism is included in WebStorage
API, but not in IDB. I suppose right moment to emit these events would be
just after emitting transaction complete.

I wasn't able to find any references from the archives and I hope I'm not
asking same question again. Also I hope I'm not asking this question too
late.

My blog article talks about this in a bit more detailed level under header
"Shortcomings of IndexedDB". The whole article is quite long so you might
want to skip most of it. You can find it from
http://mini-thinking.blogspot.co.uk/2013/02/web-app-example-using-indexeddb.html

Thanks,
-- 
Miko Nieminen
miko.nieminen@iki.fi
miko.nieminen@gmail.com
Received on Tuesday, 5 February 2013 21:54:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:57 GMT