Hi,

On 1/15/07, Wolf Benz <[EMAIL PROTECTED]> wrote:
So is what you're saying this:

1 App ~ 1 NameSpace
& in that NameSpace: 1 Node Type ~ 1 DAO Class (roughly) ?

Yes, roughly. :-)

Roughy that will do I guess, unless some classes are intermingled
enough to allow 1 DAO for 2 Node Types making more sense.

Yeah, depends on how your content structure.

In fact I usually avoid the traditional DAO pattern when working with
JCR. DAOs work well when you are accessing a relational database or
some other data store whose content model is relatively foreign from
an OO perspective. JCR gives you methods like getProperty() and
setProperty() that allow very "natural" access to underlying content
without having to use an intermediate abstraction layer.

In a MVC architecture I normally use the JCR content repository
directly as the Model without any abstraction layer on top of it. In
the View I use Node.getProperty() instead of DAO bean getters and in
the Controller I have access to the full JCR feature set. This way I
can directly leverage features like versioning or observation without
any extra mapping code.

BR,

Jukka Zitting

Reply via email to