W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > July to September 2010

Re: Data Model, as seen from WebDAV

From: Julian Reschke <julian.reschke@gmx.de>
Date: Mon, 20 Sep 2010 17:35:32 +0200
Message-ID: <4C977F44.9040800@gmx.de>
To: w3c-dist-auth@w3.org
On 08.09.2010 17:17, Julian Reschke wrote:
> ...
>> 1.3 Identification: WebDAV: the name of a resource within a collection
>> is a
>> unique identifier. JCR: same (except that for same-name-siblings, the
>> array
>> index may change when siblings are removed/inserted).
>
> -> WebDAV model (where index notation would be used if we want same-name
> siblings)
> ...
>> 2.3 Naming: namespace name + local name (WebDAV, JCR)
>
> This will require some work; expanded names may be a bit heavy-weight;
> more feedback appreciated.
> ...

Related to naming of resources and properties we *also* have to think 
about whether they should share the same space of names.

In WebDAV, properties are not exposed as HTTP resources (*), instead the 
special HTTP method PROPFIND is used. Thus, collisions between 
properties and children of a resource are no concern: a folder could 
have both a child resource "foobar" and a property "foobar".

(*) Yes, that's one of the big issues with the WebDAV approach; but 
maybe we can fix this by exposing WebDAV properties over HTTP GET in the 
future.

In JCR, the same space of names is used for resources and properties, 
thus once the name of a child resource and a property collide, it 
depends on the type of API which one you'll get. This is something we 
need to avoid.

[[ Note: XPath uses a path-like syntax to address both elements and 
attributes, but easily works around this because @ is not valid in 
element names; similarly, it takes advantage of other reserved 
characters such as "(" and ")" to disambiguate between function and 
element names ]]

In David's JSOP slides, we see examples similar to:

var collection1 = {

   "createdby" : "user1",

   "child1" : {

     "createdby" : "user2"

   },

   "child2" : {

     "createdby" : "user3"

   }
};

That has the same problem as JCR; member names and property names can 
collide.

I think we'll need to disambiguate by introducing intermediary objects 
such as "props" and "members", or even model the collection containment 
using a reserved property name.

Best regards, Julian
Received on Monday, 20 September 2010 15:36:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 15:36:09 GMT