jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukas Kahwe Smith <...@pooteeweet.org>
Subject Re: JCR application design
Date Mon, 16 Apr 2012 14:34:33 GMT

On Apr 16, 2012, at 15:56 , Steeg Werkmans wrote:

> All,
> I've made my first steps with jackrabbit for the proof of concept part of
> our project. Fine. Now comes the real stuff... And the question I ask
> myself is how to best design my application when the backend is no longer
> JDBC, but JCR (well we may use JDBC, but it will be under the hood)...
> So I've been googling a bit and browsing trough the documentation and I'm
> still confused.. There is the OCM part of jackrabbit, my initial thoughts
> were, nice this is what I need! But then I continue my search and encounter
> articles that explain how content should come first, structure is perhaps
> not needed and should come later. And other articles go down the same route
> and explain that OCM is actually just overhead, because unstructured is the
> way to go. So I wonder what's the deal. I guess there is no right answer
> and it all depends. I'm also not looking for a right answers. Just perhaps
> some pointers and ideas about how to design applications that are persisted
> in a JCR backend. Our application is a to explain things easily a web
> application that has functionality similar to a "file explorer". So JCR is
> a natural match for the business domain.
> However.. even then. If you have unstructured information, where do those
> "OCM is overhead" and "learn to love unstructured" people put their
> business logic? Do they all just expose their javax.jcr.Node in their
> front-end logic? Or is business logic a good use case to introduce an OCM
> intermediate layer? Or is JCR aimed at content-only applications and do we
> forget about N-tier best practices when it comes to JCR?
> Another interesting question is, if I am given some kind of reassurance
> that OCM is perhaps not so evil after all, would I make a generic mapping
> (to be quite rude: store the Nodes in a Hashtable-like structure).. or is
> it okay to map JCR unstructured content to a structured java OO model?

Honestly I think it really requires a lot of playing around. There isnt a "rule set" like
with normalization for RDBMS.
I do not know OCM, but I assume it also gives you the option of using explicit node types
or just unstructured.
Note I am using Jackrabbit via PHP using Jackalope, but actually most of the type I am using
PHPCR ODM, which is similar in spirit than Java Hibernate contrary to OCM which seems to be
quite ActiveRecord inspired.

Personally in this setup I am mostly using unstructured nodes (though I usually disable same
name siblings).

Lukas Kahwe Smith

View raw message