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

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

From: Shawn Wilsher <sdwilsh@mozilla.com>
Date: Thu, 11 Mar 2010 17:05:17 -0800
Message-ID: <4B99934D.9000007@mozilla.com>
To: Jeremy Orlow <jorlow@chromium.org>
CC: Nikunj Mehta <nikunj@o-micron.com>, Kris Zyp <kris@sitepen.com>, public-webapps WG <public-webapps@w3.org>, Arun Ranganathan <aranganathan@mozilla.com>, Jonas Sicking <sicking@mozilla.com>
On 3/5/2010 4:54 AM, Jeremy Orlow wrote:
> For what it's worth, regardless of the answers to the above questions, I
> think we should switch to a callback based model.  It's great to use
> events when natural to do so, but this is a very unnatural use.  It
> provides artificial limitations (only one request in flight at a time,
> per request object).  It's ugly and confusing syntax wise (hard to keep
> track of which request object is associated with which request method,
> requires multiple statements to do each request, requires the handlers
> to be placed prior to the actual call...which is why the async example
> in http://www.w3.org/TR/IndexedDB/#introduction is so difficult to read,
> etc).  And there really isn't any precedent (that I'm aware of) for
> using events like this.  And the web developers I've spoken to have all
> been confused by the async API.
For what it is worth, all the web developers we've talked to have pushed 
for an event based API, which is why we've been pushing for it.  This 
happened with the file reader API as I understand it (Jonas or Arun 
would be able to say more).

Note that we didn't show them this exact API.

Cheers,

Shawn



Received on Friday, 12 March 2010 01:04:21 GMT

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