On Tue, Sep 22, 2009 at 09:07, Philipp Bunge <[email protected]> wrote: >> Using a namespace from the start can also be useful for migration >> because you can then distinguish a node/property created with >> old http://foo/1.0 namespace and the new http://foo/2.0 in order to >> manage them differently. > > I was wondering on how to deal with model changes and hadn't even > thought about using namespaces! Obviously this would be putting > namespaces to good use. Thanks for pointing this out to me!
I don't think this approach works in practice. You will duplicate all your data - and then what? If two properties have the same name, it makes sense to see them as the same. That's why JCR already has a lot of common node types and properties, like nt:file, jcr:title, jcr:lastModified etc. (JCR 2.0 defines some helpful standardized mixins like mix:title). And upgrading nodetypes is also possible, with JCR 2.0 you will even be able to change the primary node type of an existing node. It might be some effort during upgrade, but it's definitely better to be forced to think about how your content model evolves and how to handle the migration than to create a "mess" that you will have to clean up later when it's much harder. Regards, Alex -- Alexander Klimetschek [email protected]
