You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Markus Joschko <jo...@freaquac.de> on 2004/12/08 18:43:27 UTC

Mapping of Items...

Hi,
I'm wondering what the best way to use jsr-170 in a java application will be.
How would you integrate the jcr items?
My first approach would be to write a conversation layer between jcr
nodeobjects and my java domain objects (kind like jdo/hibernate).  Is this
the way to go or would you pass the node objects around in your
application? Or is there a third alternative I don't even think about?

Does anybody know some frameworks which would support those mapping
operations?

Thanks,
 Markus

Re: Mapping of Items...

Posted by David Nuescheler <da...@gmail.com>.
hi markus,

> I'm wondering what the best way to use jsr-170 in a java application will be.
> How would you integrate the jcr items?
> My first approach would be to write a conversation layer between jcr
> nodeobjects and my java domain objects (kind like jdo/hibernate).  Is this
> the way to go or would you pass the node objects around in your
> application? Or is there a third alternative I don't even think about?

i think those are the two possibilties that come to mind
immediately.

in our experience it largely depends on the application.
to give you examples where we would use the one or the other
i went a little bit through our existing (cms) source code:

(a) for things like presentation templates where many
developers use jsp and taglibs to access content
in a content repositories, people mostly use direct
access to content nodes and pass them around for 
applications like drawing a navigation or display content.

(b) for example an application like our workflow module 
which persists all the workflow information in nodes 
(which are extended by something like a mixins) uses
"java-domain" objects. for those objects we built custom
persistence (through the repository interface of course) and 
did not use a generic mapping technique like jdo. this
is largely because we needed relatively few classes and
we want to take advantage of things like hierarchy, order, 
etc..

personally, think a jdo on top of a content repository is a cool
idea. we already built things in the past like "repository
based" resource bundles, and i think there are great 
opportunities to leverage content repository infrastructure
underneith exisiting api's think of something like "jndi"
on top of jcr, which would instantaneously add versioning to
a directory ;) .

i would certainly be in support of something like
a jdo layer on top of jcr, using a content repository
for persistence rather than a database, but keep
in mind that that features like ordering, hierarchies,
versioning etc.. would not be directly exposable 
through jdo. nevertheless, i like the idea.

regards,
david
----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97