W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > May 2010

Re: RDFa DOM API (Fully merged)

From: Mark Birbeck <mark.birbeck@webbackplane.com>
Date: Wed, 19 May 2010 17:34:38 +0100
Message-ID: <AANLkTim4mN22dAGmHTmwEc8YClIrN5KLQUokYafQBlr2@mail.gmail.com>
To: Dan Brickley <danbri@danbri.org>
Cc: Toby Inkster <tai@g5n.co.uk>, Manu Sporny <msporny@digitalbazaar.com>, RDFa WG <public-rdfa-wg@w3.org>
Hi TobyhatEhat Manu has done (rather impressively), is to merge the
API that he and Benjamin did, with a first cut of my design. Now we're
in a strong position to move forward in tandem, since we have all
ideas in the same document.

So...on your points about the name of the 'get a property group by
identifier' function, I agree, and I've always wanted to call thus
method 'describe' for reasons that I'm sure you will immediately grok.
;)

So we'd have:

  var toby = document.data.describe( "#toby" );

Now, the nice thing about this method is that it doesn't aim to return
every property for a subject; instead it will try to return a sensible
set of properties based on the type. This might be quite crude in the
default mode, but the author can override the defaults, both globally
and on a per-call basis.

I'm a little nervous asking if you like describe()...but the changes
will be added soon, so you can see what you think when it's in
context.

Regards,

Mark

On Wednesday, May 19, 2010, Dan Brickley <danbri@danbri.org> wrote:
> On Wed, May 19, 2010 at 2:36 PM, Toby Inkster <tai@g5n.co.uk> wrote:
>> On Wed, 19 May 2010 00:08:28 -0400
>> Manu Sporny <msporny@digitalbazaar.com> wrote:
>>
>>> http://www.w3.org/2010/02/rdfa/sources/rdfa-dom-api/
>>
>> I really don't like some of the method names. In particular, the
>> document.getObjectsByX names are galling given that their function is
>> to get groups of statements sharing a common *subject* (not object).
>>
>> For anyone just starting out with RDF and RDFa, who has just grasped
>> the notion of subject, predicate and object, the following method name
>> will make their head asplode...
>>
>>        document.getObjectsBySubject
>
> Yes, the subject/predicate/object terminology is sometimes useful, but
> in an API I'd suggest steering away from it if possible. Especially
> with the 'O' in DOM standing for object, it'll cause confusion.
>
>> How about renaming them getItemsByX? Or is that too close to
>> Microdata's API.
>
> Imitation is the sincerest form of flattery. I quite like 'item'...
>
> Dan
>
>
Received on Wednesday, 19 May 2010 16:35:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:47 UTC