Re: Gallery API draft review request

On May 22, 2012, at 20:52 , Greg Billock wrote:
> One piece of feedback we've gotten on the API is that we should be
> able to enumerate the extra data fields (i.e. returning a dictionary
> there instead of the getExtra() function). My concern about that is
> that it's a bit ambiguous how that relates to Javascript, and that's
> why we don't see APIs use that pattern. Is there a good way around
> that difficulty?

I've been looking at this again and it made me wonder: is there a reason why this is exposed as getExtra(key) rather than simply having a readonly attribute any extras that would expose the whole thing as a dictionary? I may be missing something, but that would seem to give us good JS integration, enumeration, etc. free. What were the concerns that led to using an accessor here?

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Wednesday, 20 June 2012 10:59:26 UTC