Methods for referencing URIs

Hi,

I'd like to discuss various ways of referencing URIs in web 
applications. The particular case I'm interested in is vocabulary terms 
URIs which are often used across applications and in various RDF 
outputs. A typical use case is to annotate pieces of data stored in a 
database or in a structured representation of a knowledge base (see 
example below). For the RDFa in Drupal core effort, I'm looking for the 
best way to store URIs and keep it lightweight and developer friendly.

I see three different methods for referencing vocabulary URIs.

1. Full URI. very verbose and not very readable.

2. CURIE. easy to read and user friendly. It requires to keep a prefix 
table of all the prefixes used in the system. It is also RDFa-ready in 
the sense it can be output as it is in the HTML output along with the 
prefix definitions. Using different versions of the same vocabularies is 
a little more complex, but that's an advanced feature which is not 
required at this stage.

3. By reference: all the terms used in the system are stored in a table 
and their id is used as reference, which involves extra processing.

I lean towards solution 2 which I find to be the best compromise between 
portability, weight and usability.

A typical use case is for representing a blog post for example:

$object->title = 'Title of my blog post';
$object->created = '1235130980';
$object->user_id = 2;
$object->body = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
$object->rdf_mappings = array(
    'type' => 'sioct:Weblog',
    'title' => 'dc:title',
    'body' => 'sioc:content',
    'user_id' => 'dc:creator',
  );

Has anyone used CURIEs as main format for storing URIs? Do you see any 
problem with it?

regards,
Stéphane.

Received on Saturday, 2 May 2009 14:28:28 UTC