W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2010

Re: [IndexDB] Proposal for async API changes

From: Andrei Popescu <andreip@google.com>
Date: Thu, 20 May 2010 19:30:05 +0100
Message-ID: <AANLkTilRYUujHfwrnRcZElmgjJPtbOTTU_rh7a-TrnjJ@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Webapps WG <public-webapps@w3.org>
Hi Jonas,

>> A draft of the proposed API is here:
> http://docs.google.com/View?id=dfs2skx2_4g3s5f857

As someone new to this API, I thought the naming used in the current
draft is somewhat confusing. Consider the following interfaces:


Just by looking at this, it is pretty hard to understand what the
relationship between these interfaces really is and what role do they
play in the API. For instance, I thought that the IDBDatabaseRequest
is some type of Request when, in fact, it isn't a Request at all. It
also isn't immediately obvious what the difference between
IndexedDatabase and IDBDatabase really is, etc.

I really don't want to start a "color of the bikeshed" argument and I
fully understand how you reached the current naming convention.
However, I thought I'd suggest a three small changes that could help
other people understand this API easier:

- I know we need to keep the "IDB" prefix in order to avoid collisions
with other APIs. I would therefore think we should keep the IDB prefix
and make sure all the interfaces start with it (right now they don't).
- The "Request" suffix is now used to denote the asynchronous versions
of the API interfaces. These interfaces aren't actually Requests of
any kind, so I would like to suggest changing this suffix. In fact, if
the primary usage of this API is via its async version, we could even
drop this suffix altogether and just add "Sync" to the synchronous
- Some of the interfaces could have names that would more closely
reflect their roles in the API. For instance, IDBDatabase could be
renamed to IDBConnection, since in the spec it is described as "a
connection to the database". Likewise, IndexedDatabase could become
IDBFactory since it is used to create database connections or key

In any case, I want to make it clear that the current naming works
once one takes the time to understand it. On the other hand, if we
make it easier for people to understand the API, we could hopefully
get feedback from more developers.

Received on Thursday, 20 May 2010 18:30:39 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:25 UTC