Re: [mawg] Re: ACTION-177: API at client/server side (was: Call for Test Cases)

On Tue, Nov 10, 2009 at 7:36 AM, Pierre-Antoine
<pierre-antoine.champin@liris.cnrs.fr> wrote:
> Le 08/11/2009 03:43, Silvia Pfeiffer a écrit :
>> BTW: re javascript API: It should be a small number of functions, not
>> one per property ("getTitle" seemed to indicate to me that there was a
>> particular API function for it). If it turns out you need more than
>> one, that's fine. Just not one per property (which, incidentally, is
>> also more extensible).
>
> except for the point of extensibility, which I understand, could you
> elaborate on the rationale for "Just not one per property"?
>
> Although there has to be a generic function for the sake of
> extensibility, I think the general feeling of the group was that it is
> more convenient for a developer to write
>  getTitle(...)
> than
>  getProperty("title", ...)

If you make a convenience function *in addition* to all the functions
to access individual properties, you end up with more than one
function that has to be implemented, e.g. in every single Web browser.
That would be something that would be unacceptable to HTML. Also, it
would stop being extensible.

Cheers,
Silvia.

Received on Wednesday, 11 November 2009 12:58:36 UTC