W3C home > Mailing lists > Public > public-device-apis@w3.org > December 2009

Re: Callback naming

From: Robin Berjon <robin@berjon.com>
Date: Wed, 2 Dec 2009 13:24:28 +0100
Cc: Ilkka Oksanen <Ilkka.Oksanen@nokia.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>
Message-Id: <B37AC8DD-E3F0-4804-B8CC-AF5EE5FF0117@berjon.com>
To: Dominique Hazael-Massieux <dom@w3.org>
On Dec 2, 2009, at 13:16 , Dominique Hazael-Massieux wrote:
> Le mercredi 02 décembre 2009 à 13:44 +0200, Ilkka Oksanen a écrit :
>> There is related issue conserning SuccessCallback, ErrorCallback and 
>> PendingOperation interfaces. In camera API those interfaces are copied 
>> from Richard's Contact API draft. Would it be possible to create common 
>> parts specification or something similar for them to get rid of copy 
>> paste WebIDL?
> 
> While that’s true for PendingOperation, I feel pretty strongly that in
> many cases (and in particular in the Capture API) we will want
> specialized SuccessCallback interfaces — I modified the Capture API
> document this morning to reflect that —, and possibly specialized
> ErrorCallback (this still needs to be fixed in the capture API draft)

Right, that's what I was going to say. I'm happy to add PendingOp to the Device API (I guess we should stuff all the reusable paraphernalia there), but we should discuss the others further — they may be very similar across APIs, but abstracting them away could be excessively early refactoring. Put another way, Early Optimisation + Theoretical Purity = Horrible Things :)

-- 
Robin Berjon - http://berjon.com/
Received on Wednesday, 2 December 2009 12:25:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:02 GMT