jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jocsch" <joc...@freaquac.de>
Subject Re: Node.orderBefore(String,String)
Date Thu, 16 Dec 2004 09:50:57 GMT
Hi david,

>personally, i usually avoid sns use in favour of residuals, however i can
>see that people may have a different opinion on that topic.
>i must a admit that, when i saw your earlier post the content design
>that was suggested by your question looked a bit unusual to me,
>however probably legitimate.

I thought having equal names for node types would be the way to go. But
I'm not fixed on using SNS. Looks like I have to read up on residuals.
Giving the nodes different names (with business meanings) would mix
structure and content, or? ( I somewhere read about using a jcr:content
node to seperate structure & content which would imply to not use business
properties in the node name).
I give you a concrete example I prototype with, so the discussion can be
more concrete:

I would like to store a webpages structure+content in the repository (not
the html but the parts from which the html will be generated).

I thought about a structure like

 |   |-jcr:content
 |   |   |
 |   |   tst:title
 |   |   |
 |   |   tst:pictures
 |   |
 |   |-tst:page[2]
 |   |...

(hopefully this ascii art isn't destroyed by the mail transfer ;-))

This would also reflect the ordering of the pages.
As you can see I use "tst:page" as node name. I could for sure use the
content of the tst:title property of the jcr:content node as name instead
of "tst:page".

That might have some advantages like a more natural navigation through the
tree and fewer problems with ordering.

What would be your approach to realise this scenario? I would really
appreciate your thoughts about that.

>could your suggestion be an additional api call
>something like the addition of a Node.getIndex() method
>which returns 1 if non-sns ?
>(we could put as an input from the public on to
>our jsr-170 issueslist ... obviously i am trying to keep changes
>to a minimum at this point ;) )

Yes. That would be a very important improvement. If you have SNS and a
orderBefore method, you need a way to find the position (withouth being
forced to hack strings together. That seems really hacky).

But me personally would like to see a method like orderBefore(Node,Node)
in addition. I'm not a big friend of operating with strings if I already
have the nodes which I would like to use for the operation.

>i am not aware of another solution that would keep your original
>sns based content design in place.

As stated above. This is just a prototype. I'm trying to find the best
solution and have no problem with discarding the sns approach.


View raw message