On Thu, May 29, 2008 at 10:47 PM, Chris Colman
<[EMAIL PROTECTED]> wrote:
> Oh ok, it's probably just a terminology issue then. We use JDO and hence
> the PersistenceManager is our equivalent to the others you speak of.

The PersistenceManager shouldn't be part of your domain model.

>
> In the past DAOs were always a beast that had to be dealt with
> explicitly to store and retrieve objects. The Hibernate Session, JDO
> PersistenceManager etc., are a lot less 'manual' with automatic 'load on
> demand' and update of dirty objects and so I never associated them with
> the old fashioned DAOs we used to create.
>

Hibernate vs. JDO vs. iBATIS vs. JPA is still an implementation
detail.  Your true "domain" shouldn't care what persistence technology
you're using.

> We also use the "Exposed POJO Domain Model" pattern with its
> 'repositories' (for locating objects) and 'services' (for making
> significant model changes according to embedded business rules) which
> allows us to write code that can be easily ported to any transparent
> persistence provider and it manages all the dependency injection in a
> very light weight manner in simple Java rather than a 'sea of XML' which
> really turned me off Spring.
>
>

The "Exposed POJO Domain Model" would prescribe that you use an
interface for your repositories.  The implementation of those
repositories would be based on the persistence technology, but it
could be switched out without changing any of your other domain
classes (the interface would stay that same).  So, you still need the
repository/dao abstraction (most folks still use the term "DAO" rather
than "repository" in my experience).

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to