Re: RDFa DOM API Version 0.1beta committed

On 21 Apr 2010, at 13:36, Benjamin Adrian wrote:

> Ivan Herman schrieb:
>> Dear all,
>> 
>> I have a more general comment on this API, not on the details.
>> 
>> As I look through the interface elements, most of them are, in fact, independent of RDFa. Objects like an RDF Literal, URI references, various iterators on triples, filtering, etc, are not RDFa specific, they are the core of a generic RDF api for Javascript. I am not saying that is wrong (on the contrary!), but it may be worth making this point much more strongly in the document and in the code. I am not 100% sure how to do that in Javascript; in Python, I would separate the generic parts into a separate module or a package and I'd put the rdfa part into yet another one. That would allow non-RDFa applications, for example ones that connect to a SPARQL endpoint from javascript, to use the common classes and API implementation to extend beyond RDFa, if they wish, easily.
>>  
> That's a good point. I think it is possible to put the type definitions (RDFTriple, URI, *Literal, RDFTripleList, etc. ) into a separate module
> in the WEB IDL specification. (e.g., w3c:rdf). Then the RDF Storage API may extend especially this module.
> RDFa specific methods (everything in rdfa.*) may reside in module w3c:dom:rdfa.
> 
> Unfortunately, namespaces do not exist in Javascript.
> Therefore it is difficult to define the types  RDFTriple, URI, *Literal, RDFTripleList, etc.
> in the scope of let's say "rdf". Does anybody knows a solution here?

How about just prepending a prefix to the type names? This leads to a kind of "implicit namespace" (not sure how to call it). This kind of thing is done in the Objective-C world, where by convention each class name is prefixed by the acronym of the framework (library) it belongs to. E.g., all classes in Apple's Cocoa frameworks are prefixed with "NS" (NextStep), e.g. "NSString", "NSNumber", ... Classes in the Address Book framework are prefixed "AB", e.g. "ABPerson". I'm not sure how well this would work in JavaScript though, it's just a thought.

Cheers,
Knud

>> ...
>> 
>> ----
>> Ivan Herman, W3C Semantic Web Activity Lead
>> Home: http://www.w3.org/People/Ivan/
>> mobile: +31-641044153
>> PGP Key: http://www.ivan-herman.net/pgpkey.html
>> FOAF: http://www.ivan-herman.net/foaf.rdf
>> 
>> 
>> 
>> 
>> 
>>  
> 
> 
> -- 
> __________________________________________
> Benjamin Adrian
> Email : benjamin.adrian@dfki.de
> WWW : http://www.dfki.uni-kl.de/~adrian/
> Tel.: +49631 20575 145
> __________________________________________
> Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
> Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
> Geschäftsführung:
> Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff
> Vorsitzender des Aufsichtsrats:
> Prof. Dr. h.c. Hans A. Aukes
> Amtsgericht Kaiserslautern, HRB 2313
> __________________________________________
> 
> 

-------------------------------------------------
Knud Möller, PhD
+353 - 91 - 495086
Smile Group: http://smile.deri.ie
Digital Enterprise Research Institute
  National University of Ireland, Galway
Institiúid Taighde na Fiontraíochta Digití
  Ollscoil na hÉireann, Gaillimh

Received on Thursday, 22 April 2010 13:58:54 UTC