ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lamey <cla...@localmatters.com>
Subject Re: Anemic Domain Model and iBatis
Date Mon, 02 Apr 2007 22:12:48 GMT
Hello,

There's nothing that says the model objects you use to get things in and
out of the relational database have to be the ones you present in higher
levels.  iBATIS doesn't dictate your object model.

>>From the posts I see on this list, a lot of people use a intermediate
layer (or two or three) between iBATIS and their higher level of code to
shield the higher code from the relational underpinnings.  But the
reality is that iBATIS interfaces with relational databases, which is
where impedance mis-match shows up:

    http://en.wikipedia.org/wiki/Object-Relational_impedance_mismatch

I've seen lots of projects go the pure OO route and disregard the
database only to run into significant refactoring issues because of the
database and relational reality.

It all depends on your situation...setting up a relational friendly
model all the way up the chain won't get you points in OO class, but if
you're dealing with very large datasets and/or performance is your top
concern, you might not care if Mr. Fowler wouldn't like it.  Or if
you're providing an API for a several dozen other developers, a nicely
done OO API might be what you need.  And if you've got the time and
money, why not do both?

Whatever the approach, it is safe to say that iBATIS is an excellent
framework:)

Cheers,
topher

On Mon, 2007-04-02 at 16:19 +0300, Cihat.altuntas wrote:
> What do you think about iBatis POJOs and Anemic Domain model that
> martin fowler describes : 
> 
> http://www.martinfowler.com/bliki/AnemicDomainModel.html
> 
> iBatis uses POJOs like anemic domain model. Most of the classes only
> have getter and setter methods. Is this domain model or just DTO or
> Value Objects? Where do you put your core domain logic ? is iBatis
> suaitable for Rich Domain models? I want to see your opinions about
> this subject?
> 

Mime
View raw message