On 7/23/10 11:08 AM, Tony Giaccone wrote:

> 
> I'm right with you, your posting made total sense to me, but then Bertrand 
> wrote about not using SNS, and that caused me no end of cognitive dissonance. 
>  What are arrays of objects? They are typically objects of the same type and 
> would be modeled, I assume as SNS.  Now if you want to dodge that bullet by 
> saying, Well they have names that are the ordinal number of the element in 
> the array, ok.. I can live with that, but it feels like a hack, and not 
> really the right way to structure that.
> 
I think the general idea is that everything can be given a unique name.
Sometimes that name can be derived from the content (i.e. a blog title),
sometimes it can't be and has to be generated.

So, to make it a bit clearer, let me revise my suggestion:
/orders/{orderID} - the order
/orders/{orderID}/lineItems - a sling:OrderableFolder
/orders/{orderID}/lineItems/92efebc2 - the first item
/orders/{orderID}/lineItems/7d845c52 - the second item

I do agree that there is an unfortunate level of dissonance between
"David's Model" and the JCR spec. But I think that is, to an extent, in
the nature of standards committees.

> If we are modeling a document and there are a list of  paragraphs, aren't the 
> paragraphs SNS (<p>)?
I don't do a lot of document management, but I believe CQ, for example,
stores a page's paragraphs in a multi-valued String property.

> 
> It seems we're playing fast and lose with the differences between a nodes 
> name, it's "type" and it's ordinal position.
Not sure what you mean here. Every node needs a name. A node's name need
not have a relation to the node's type or ordinal position.

>  Now maybe that's the nature of mucking with nt:unstructured nodes, I don't 
> know. But I'm trying to wrap my hands around how this all works. 
> 
>>
>>>
>>> If the solution isn't SNS then what is it?
>> DNS (different named siblings) :)
> 
> Yes, well that's fine.. :-)
> 
> 
>>
>> HTH,
>> Justin
>>>
>>>
>>>
>>> Tony
>>>
>>> On Jul 23, 2010, at 4:12 AM, Bertrand Delacretaz wrote:
>>>
>>>> On Thu, Jul 22, 2010 at 9:44 PM, Justin Edelson <[email protected]> 
>>>> wrote:
>>>>> On 7/22/10 3:17 PM, Tony Giaccone wrote:
>>>>>> ...The problem I'm having is that I don't want to give each line item a 
>>>>>> unique name.
>>>>>> Does a node have to have a unique name?...
>>>>> Theoretically, no, each node does not need a unique name if you use same
>>>>> name siblings....
>>>>
>>>> Note that SNS are a bad idea for a variety of reasons, see rule #4 at
>>>> http://wiki.apache.org/jackrabbit/DavidsModel
>>>>
>>>> -Bertrand
>>>
>>
> 

Reply via email to