Re: Advice on how to best handle a long list of attributes

On Fri, Sep 26, 2014 at 2:29 AM, Jeffrey Yasskin <jyasskin@google.com> wrote:
> Whatever we do with naming, there's also the stylistic questions of
> how to expose them:
> 1) Does the web prefer navigator.foo.bar or window.FooBar?

The latter, classes you can construct over objects that come out of nowhere.


> 2) Does the web prefer an object with attributes or a Map?

For APIs you typically can't use either directly. So, depends...


https://wiki.mozilla.org/WebAPI/DesignGuidelines has some general tips
as well as some pointers to more specific advice.

Although the WebGL API is rather sad in places, you could look at it
for some inspiration as to how to handle mapping to an underlying API
from JavaScript.

Also, it sounds like you need to embrace the fact that you will have
to keep updating this specification forever. A specification is
basically a piece of software in that way. Having it magically
co-evolve with Bluetooth seems unrealistic (and not necessarily
desirable, as their design choices might not match the web well).


-- 
https://annevankesteren.nl/

Received on Friday, 26 September 2014 07:29:07 UTC