jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger" <Felix.Meschber...@day.com>
Subject Re: Web app design pattern questions
Date Wed, 20 Jun 2007 08:49:02 GMT

Well, your mileage may vary :-)

In my experience, JCR is a wonderful and easy API to use. Still having
proper Java Objects to work on and to delegate loading and unloading to an
OCM layer helps me a lot - in terms of typing, fail safeness and not having
to worry about checked exceptions which are not thrown in most cases anyway.

And by the way, using an OCM with proper objects also helps a lot ensuring
the integrity of the data managed, as there is a single point of control
regarding how the data is accessed. Again, your mileage may vary, but as
code tends to grow, this should be seriously considered.


On 6/20/07, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
> 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:
> Chiming in a bit late...
> > 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
> > objects back into the node, but it could be the safer design.
> When possible I typically try to avoid extra layers on top of JCR.
> Unlike relational databases, JCR is actually quite "OO-friendly" so
> the need for an DAO/DTO layer is not that big. Typically such a layer
> just ends up limiting the available functionality.
> I'm not against the OCM tool as is, I think it is very useful when you
> already have an existing object model to be persisted, but if you get
> to start from scratch then I would rather recommend directly using
> JCR.
> My favourite way of working with JCR is to treat nodes as stateful
> resources, and my code as a set of stateless operations to be applied
> on those resources. Such an approach is very "web-friendly".
> BR,
> Jukka Zitting

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message