But you have also lost any relation the two have, the only one who "knows" there is any relationship is your application. Any repository management tools you are going to use will have to be specifically written/adjusted to handle this.
I do agree with your basic premise that you should think carefully about your hierarchy although it seems to go directly against your rule #1? Imposed hierarchy or node types, they are both ways of reducing flexibility to improve workability (leaving complete flexibility would mean that your code would have to be able to take into account any possible configuration of data, probably leaving it incapable of doing much or at least it would make the code immensely complex) I can see the merit of the "Data First" argument, but I think the word "first" needs to be stressed, it implies there is a "second". Because if you're going to use a strict hierarchy for your nodes but you don't use the type system to fix at least the important relationships you are left with a very brittle data structure that will be very susceptible to changes made by code/a person who isn't aware of all the assumptions made by its designer. PS: I'm not saying that every aspect of your data should be modeled, I think one of the great things about the JCR is the fact that you can make type definitions but still leave room for extensions/additions. What is needed is an easier way to "upgrade" an existing node type (and the existing content based on it) incrementally each time that your knowledge about the structure of a piece of data improves. That way you can start with "Data First" knowing that you'll be able to easily move it to "Structure Second"... well something like that anyway ;-) On 7/9/07, Bertrand Delacretaz <[EMAIL PROTECTED]> wrote:
On 7/9/07, Thomas Mueller <[EMAIL PROTECTED]> wrote: >... > /content/myblog/posts/iphone_shipping > > /content/myblog/comments/iphone_shipping > > A potential problem I see here is typos. What if you wrote 'phone' > instead of 'iphone' by mistake, and somebody make a comment already: > you need to update two nodes (more if you have other groups). ... I wouldn't update node names if the post's title changes later. The node name is just a system-generated key which happens to look like the original post's title. Many blog engines work like that, and never change the post's URL. -Bertrand
