Re: RDFa API comments from TimBL

Hi Nathan,

This is just the kind of feedback we'd been hoping for...thanks!

However, I don't agree that the Tabulator API is better then the RDFa
API, or (most importantly) that it has been ignored.

When I first started working on a JavaScript API some years ago --
much of that work has fed into the RDFa API spec -- I looked at
Tabulator and every other RDF-related API I could find, and tried to
take the best from all of them. The RDFa API contains many
Tabulator-inspired features, from big architectural things like the
distinction between parsers, stores and query objects, through to
small details such as the 'add' method. (select() even used to be
called query().)

However, as with anything, designs move on, particularly if the goals
of a project are different. And one of the key design goals in the
later versions of the RDFa API was that it should be 'more JavaScript'
and 'less RDF'.

That means that wherever possible we would avoid sprinkling the API
with the need to create objects such as literals or URIs just so that
they can be passed in to functions, and we also avoid as much as
possible expressing everything in terms of s/p/o.

I'm afraid that in my view the Tabulator API goes in the opposite
direction; for example, the programming namespace is littered with
objects that do nothing other than manipulate strings (foaf(x), dc(x),
etc.), which is not good from a JavaScript programming perspective,
and in my mind leads to confusion.

The 'more JavaScript' and 'less RDF' approach is based on the belief
that the audience for this API goes way beyond the RDF community,
which also means that we should leverage people's familiarity with
existing DOM practices. This is why methods are named things like
'getElementsByType' and 'getItemBySubject', leveraging familiarity
with method names such as 'getElementsById'.

Again, I feel that Tabulator goes in the opposite direction with its
use of method names like 'sym' and 'statementsMatching'.

Having said all of that, the RDFa API is essentially in two parts, one
of which covers lower-level RDF-related features and the other
providing a higher-level interface for those less familiar with RDF.
Since the lower-level functions are aimed primarily at the RDF
community then it's certainly possible that we could take those in a
more Tabulator-like direction, if that's what people want.

However, I personally wouldn't like to see the higher-level API taken
in that direction, if nothing else because JavaScript programming has
moved on enormously since Tabulator was first formulated.

Hopefully it goes without saying that everything is up for discussion
on the list, and that the views I've expressed here are just one
potential take on this topic.

Best regards,

Mark

--
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)


On Mon, Oct 4, 2010 at 10:29 PM, Nathan <nathan@webr3.org> wrote:
> Hi All,
>
> I was speaking to Tim Berners-Lee earlier who asked me to pass on some
> feedback, he is very keen to see the RDFa API (particularly the DataStore
> interface) aligned with the IndexedFormula from Tabulator, to be specific "I
> think there is a big mistake happening to not make the RDFa API look like
> (tabulators) RDF API where it can" - he has also quickly hacked out some
> examples in section 3.2 here to cover some of the use-cases:
>
>  http://www.w3.org/2010/rdf-api/RDF-API.html#using-the-basic-api
>
> Personally, I am also keen to see this happen, preferably implementing a
> simple DataStore which can be wrapped in an IndexedDataStore - tabulators
> library is time proven and many years of feedback and improvements have been
> made, it would be a shame to loose that.
>
> Unless there are any objections, I'll start defining and implementing an
> IndexedDataStore to match the functionality of the IndexedFormula from
> tabulator, which is also in line with my post-implementation-feedback [1]
> earlier this week.
>
> Best,
>
> Nathan
>
> [1] http://lists.w3.org/Archives/Public/public-rdfa-wg/2010Sep/0149.html
>
>

Received on Tuesday, 5 October 2010 10:14:37 UTC