[battery] Cordova's feedback on the promise-based API (was: DAP-ISSUE-169)

Hi All,

On 07 Aug 2014, at 23:46, Device APIs Working Group Issue Tracker <sysbot+tracker@w3.org> wrote:

> DAP-ISSUE-169: Battery API needs to be more event driven and async, less device centric. [Battery Status API]
> 
> http://www.w3.org/2009/dap/track/issues/169
> 
> Raised by: Lisa Seacat DeLuca
> On product: Battery Status API
> 
> on behalf of Joe Bowser
> 
> 'The spec is flawed in that there's no way we could implement it as it
> stands. The spec needs to be reworked to be more event driven and
> asynchronous.   Right now it's too much like device with everything up
> front."
> 
> 
> http://apache.markmail.org/search/?q=org.apache.incubator.callback-dev+list%3Aorg.apache.incubator.callback-dev+order%3Adate-backward+w3c#query:org.apache.incubator.callback-dev%20list%3Aorg.apache.incubator.callback-dev%20order%3Adate-backward%20w3c+page:1+mid:3qrirxhvzumzkyh2+state:results

I had a chat [1] with Brian LeRoux (also one of the original authors of the PhoneGap/Cordova project), and I asked him:

“Does [the promise-based API] [2] address the [Cordova] implementability concerns [Cordova project] had with the sync API? [3].”

Brian answered: “yes, the sync api [3] would not be implementable (or, responsibly so) in cordova so this [2] is much better (our native bridge is async).” 

I promised [no pun intended] to bring Brian's feedback to this group, so here it is.

Brian (cc’d) - if you want to elaborate Cordova's position, please feel free to post a mail to the public-device-apis mailing list.

Given this, it appears we now have two implementers, Google and Adobe, with a preference for the promise-based API [2] over the sync API [3].

Thanks,

-Anssi

[1] https://twitter.com/anssik/status/497450104056729601
[2] https://dvcs.w3.org/hg/dap/raw-file/default/battery/Overview.html
[3] http://www.w3.org/TR/battery-status/

Received on Friday, 8 August 2014 08:36:04 UTC