jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: David's Model question : nt:unstructured and SNS
Date Mon, 16 Nov 2009 12:38:34 GMT
2009/11/16 Fabián Mandelbaum <fmandelbaum@gmail.com>:
> It's simpler than fiddling around with this low-level stuff actually:
> Just create a DAO to abstract all JCR operations (as you should be
> doing already)

(To give my usual opinion about object content mapping and JCR:) If
you use DAOs this of course is a straight-forward solution (but only
for the code that uses the DAO layer), but I think that using JCR
directly is not "low-level" stuff:

- JCR Node already is like a DAO, and a more flexible one (nt:unstructured)
- nodetypes can give you validation
- session (+ transactions) provide all you need for managing the
object's lifetime and separation into sessions
- access control, versioning, search etc. are quite high-level IMO, so
you should use them directly

I see the point for DAOs only when you really want to be sure that
application coders can only use the properties you designed for them.
Or when you have a relational model and are required to map it onto an
object model, but that's not the case with JCR. An OCM only adds an
additional layer of code and complexity.

Just my 2 cents...

Alexander Klimetschek

View raw message