jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bilobag <bilo...@hotmail.com>
Subject Re: Web app design pattern questions
Date Tue, 19 Jun 2007 14:35:20 GMT

I read about the mapping tool, but i didn't think it was in a stable
condition.  Also, is there any documentation for getting started with this? 
So the wrapper class design isn't a good idea?

Christophe Lombart wrote:
> 
> Hi
> 
> DTO is a nice design pattern.
> Why not to use the Jackarabbit ocm tools (see in
> contrib/jackrabbit-jcr-mapping/jcr-mapping.
> By this way, you can have your wrapper classes/DTOs matching to JCR nodes.
> 
> br
> Christophe
> 
> On 6/19/07, bilobag <bilobag@hotmail.com> wrote:
>>
>>
>> I am in the beginning stages of a web based CMS tool using JSF, Spring
>> and
>> Jackrabbit.  Please give any design advice you may have for the following
>> questions:
>>
>> 1) I have 3 node types. Content, book, magazine.  Book and magazine
>> extend
>> the content type.  They all have some common properties and some
>> different
>> properties.  Now I first thought about creating wrapper classes that just
>> wrap the Node object and provide getters/setters for any properties I
>> have
>> for each nodeType.  However, I am unsure if this is a good idea possibly
>> because of locking and concurrency issues.  I don't know if its a better
>> idea to have data transfer objects instead to move data to/from the front
>> end.  However, its more work to have to copy the propertys to/from the
>> DTO
>> objects back into the node, but it could be the safer design.
>>
>> 2) When adding a node, if I use my node wrapper classes, I will call
>> addNode() on the parent and wrap the child node.  Then forward to the
>> form
>> page where the node data is entered...then call save().  The only issue
>> is
>> that when you call addNode, you need to specify the path/name of the
>> node.
>> I will not have this information until after the user submits the form.
>> First, how important is the path/name of the node?  To me it seems like
>> it
>> should always be unique amongst nodes with the same parent.  Second, this
>> goes back to my first question where i'm not sure whether to use DTO's or
>> node wrapper classes.  If i use DTO's, adding won't be an issue.  Please
>> give any design advice you may have.  Thanks.
>> --
>> View this message in context:
>> http://www.nabble.com/Web-app-design-pattern-questions-tf3946577.html#a11195283
>> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Web-app-design-pattern-questions-tf3946577.html#a11196024
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Mime
View raw message