Re: Promises - review of use in Network Service Discovery draft?

On Thu, Aug 29, 2013 at 4:12 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Wed, Jul 24, 2013 at 10:02 AM,  <Frederick.Hirsch@nokia.com> wrote:
>>
>> <https://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html>

>> Would members of the list that have experience with Promises please (if possible) review the Promises usage in this editors draft and let the DAP WG know of any concerns or best practices that we need to consider (or confirm that our usage looks good)?
>
> This is a rather late response, but the use of Promises appears fine
> at first blush.

Good. I think this answers the original request.

>
> Use of integer constants is bad.  Make an enum with the values
> instead, and have the error contain an attribute of that enum type.

I've gone ahead and switched error codes to error strings. This change
also means we can just return DOMError objects in this API so I also
took the opportunity to remove NavigatorNetworkServiceError from the
spec (hey, less custom interfaces!).

A spec diff is available at https://dvcs.w3.org/hg/dap/rev/5e36d90b8960

>
> I had a comment about not putting everything on navigator, but this
> might actually be validly connected to the navigator.

I don't have a strong opinion on this but it is (notoriously)
difficult to agree where such APIs should hang from. So we will keep
this on navigator unless a strong counter-proposal can be made.

br/ Rich

>
> ~TJ
>

Received on Thursday, 29 August 2013 09:15:03 UTC