You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Nicolas Dufour <nr...@gmail.com> on 2008/04/14 15:52:20 UTC

Are the node types the root of evil ?

Hello

After using JCR for a good while, I came to the conclusion that nodetypes
are useless or even dangereous ;-)
Because, after all, once the node type definition is registered and you got
tons of nodes using it, you are pretty much locked in that schema, unless
you just want to add properties.
It seems that the best solution is to have nt:unstructured everywhere and
manage the changes yourself. Perhaps like the ruby on rails migration
system.

Dear mailing list users, what do you think ?

-- 
Nicolas Dufour
nrdufour@gmail.com

Re: Are the node types the root of evil ?

Posted by Nicolas Dufour <nr...@gmail.com>.
addendum: In fact using the node types as tags is of course useful like:
[foo:bar] > nt:unstructured.

(thanks to Alessandro Bologna ;-) ).

On Mon, Apr 14, 2008 at 9:52 AM, Nicolas Dufour <nr...@gmail.com> wrote:

> Hello
>
> After using JCR for a good while, I came to the conclusion that nodetypes
> are useless or even dangereous ;-)
> Because, after all, once the node type definition is registered and you
> got tons of nodes using it, you are pretty much locked in that schema,
> unless you just want to add properties.
> It seems that the best solution is to have nt:unstructured everywhere and
> manage the changes yourself. Perhaps like the ruby on rails migration
> system.
>
> Dear mailing list users, what do you think ?
>
> --
> Nicolas Dufour
> nrdufour@gmail.com




-- 
Nicolas Dufour
nrdufour@gmail.com

Re: Are the node types the root of evil ?

Posted by Nicolas Dufour <nr...@gmail.com>.
In fact, I'm extremely tempted that our next version will include only
nt:unstructured node types and everything will be controlled
programmatically.

Even export/import could be a pain, specially if the site cant be down for a
long time.
If I can create a background migration system I will be happy ;)

Nicolas

On Mon, Apr 14, 2008 at 1:08 PM, Tobias Bocanegra <to...@day.com>
wrote:

> it depends on the use case. but in general i agree that
> nt:unstructured is sufficient for most apps.
> the restriction that nodetypes can't be changed (reregistered) is a
> problem of jackrabbit which will be fixed soon. also the lack of
> altering the nodetypes of existing node is something that is addressed
> in jcr283.
>
> stefano and david wrote some interesting articles about that:
>
> http://wiki.apache.org/jackrabbit/DavidsModel
> http://www.betaversion.org/~stefano/linotype/news/93/<http://www.betaversion.org/%7Estefano/linotype/news/93/>
>
> --
> regards, toby
>
>
> On 4/14/08, Ivan Latysh <iv...@gmail.com> wrote:
> > Charles Johnson wrote:
> >
> >
> > > Surely this is analagous to constraints and referential integrity
> through
> > key relationships in the RDBMS model? The same things could be said
> about
> > dispensing with anything other than application layer integrity and
> > validation in that model.
> > >
> >  You can alter RDBMS structure, when JR missing such functionality.
> >  (I haven't checked latest release, yet)
> >
> >  So unless you are 200% sure of what you have to have, don't use
> NodeTypes.
> >
> >  So far we alter structure this way:
> >  backup (with JCR-Backup) -> change node types -> create new repo ->
> update
> > backed-up XML -> restore it.
> >
> >  --
> >  Ivan Latysh
> >  IvanLatysh@gmail.com
> >
>



-- 
Nicolas Dufour
nrdufour@gmail.com

Re: Are the node types the root of evil ?

Posted by Tobias Bocanegra <to...@day.com>.
it depends on the use case. but in general i agree that
nt:unstructured is sufficient for most apps.
the restriction that nodetypes can't be changed (reregistered) is a
problem of jackrabbit which will be fixed soon. also the lack of
altering the nodetypes of existing node is something that is addressed
in jcr283.

stefano and david wrote some interesting articles about that:

http://wiki.apache.org/jackrabbit/DavidsModel
http://www.betaversion.org/~stefano/linotype/news/93/

--
regards, toby


On 4/14/08, Ivan Latysh <iv...@gmail.com> wrote:
> Charles Johnson wrote:
>
>
> > Surely this is analagous to constraints and referential integrity through
> key relationships in the RDBMS model? The same things could be said about
> dispensing with anything other than application layer integrity and
> validation in that model.
> >
>  You can alter RDBMS structure, when JR missing such functionality.
>  (I haven't checked latest release, yet)
>
>  So unless you are 200% sure of what you have to have, don't use NodeTypes.
>
>  So far we alter structure this way:
>  backup (with JCR-Backup) -> change node types -> create new repo -> update
> backed-up XML -> restore it.
>
>  --
>  Ivan Latysh
>  IvanLatysh@gmail.com
>

Re: Are the node types the root of evil ?

Posted by Ivan Latysh <iv...@gmail.com>.
Charles Johnson wrote:

> Surely this is analagous to constraints and referential integrity 
> through key relationships in the RDBMS model? The same things could be 
> said about dispensing with anything other than application layer 
> integrity and validation in that model.
You can alter RDBMS structure, when JR missing such functionality.
(I haven't checked latest release, yet)

So unless you are 200% sure of what you have to have, don't use NodeTypes.

So far we alter structure this way:
backup (with JCR-Backup) -> change node types -> create new repo -> update 
backed-up XML -> restore it.

-- 
Ivan Latysh
IvanLatysh@gmail.com

Re: Are the node types the root of evil ?

Posted by Charles Johnson <cj...@proteanit.net>.
Nicolas,

Surely this is analagous to constraints and referential integrity 
through key relationships in the RDBMS model? The same things could be 
said about dispensing with anything other than application layer 
integrity and validation in that model.

Charles

Nicolas Dufour wrote:
> Hello
>
> After using JCR for a good while, I came to the conclusion that nodetypes
> are useless or even dangereous ;-)
> Because, after all, once the node type definition is registered and you got
> tons of nodes using it, you are pretty much locked in that schema, unless
> you just want to add properties.
> It seems that the best solution is to have nt:unstructured everywhere and
> manage the changes yourself. Perhaps like the ruby on rails migration
> system.
>
> Dear mailing list users, what do you think ?
>
>