Re: [w3ctag/design-reviews] Web of Things (WoT) Architecture (#355)

I see that you basically return JSON if asking for more than one property. There are 3 methods just for reading properties and I wonder whether they can be combined somehow, or at least the latter two.

```
  Promise<any> readProperty(DOMString propertyName);
  Promise<object> readAllProperties();
  Promise<object> readMultipleProperties(sequence<DOMString> propertyNames);
```

It is true that there is only one async event and then all data will be delivered. In a way async iteration would work (key propertyName/value), though there will basically be no wait between the iterations. I don't know whether that would be a bad way of handing that or not, @domenic 

But I guess you decided to return JSON so that you can look up in that, but why not just use an ordered map? https://infra.spec.whatwg.org/#ordered-map





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/355#issuecomment-509707555

Received on Tuesday, 9 July 2019 16:12:46 UTC