jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: David's Model question : nt:unstructured and SNS
Date Tue, 17 Nov 2009 11:32:13 GMT
Hello Bertrand,

On Mon, Nov 16, 2009 at 10:15 PM, Bertrand Delacretaz
<bdelacretaz@apache.org> wrote:
> Hi Ard,
> On Mon, Nov 16, 2009 at 2:39 PM, Ard Schrijvers
> <a.schrijvers@onehippo.com> wrote:
>> ...Just wondering: where does jackrabbit-ocm fit in then? I do not have
>> that much experience with it, but it feels like JCR-to-object to me.
>> Only use it when your really really have to :-)))?...
> Actually...yes and no.
> After rereading this thread I'd say something like "if you're coming
> from a relational world where object-to-DB mapping is the norm, think
> twice before using it in the JCR world. You might not need it, as the
> JCR API is much closer to what you need at the content application
> level".

I do not agree, and fortunately, mapping jcr nodes to simple java
objects which again can be accessed from jsp / freemarker / velocity
scripts feels much more natural to me, is quite easy: I do not want to
burden other developers with handling all the jcr stuff, catching all
the exceptions, handling defaults, writing complex queries (do you
really like to write search queries? It is part of the JCR API, but I
am glad I went through all that once, and made a simple java interface
for it (similar to jr-ocm, only targeted for large repositories
avoiding slow queries, and supporting more website convenient
searches, like multiple scoped kind of queries).

Anyways, I think it is just a matter of taste. I mainly just do not
agree to add it to David's rules to avoid jcr-to-object. I encourage
developers to avoid direct jcr calls in our environment :-))

Regards Ard

> -Bertrand

View raw message