ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: [New Feature] SQL Map Interface Binding -for your review
Date Mon, 23 May 2005 00:27:05 GMT
Thanks for asking that question.

We have to be VERY clear. These are NOT DAOs! Nor are they a replacement for 
DAOs. DAOs are coarse grained classes. Mappers are more fine grained.

You're right, you would have another set of interfaces, and to some people 
this may be too many. I agree.

In a modern layered architecture you might have:

[ Presentation ] 
[ Service ]
[ DAO ]
[ Mapper ]

If I were to collapse any part of that layering strategy, I would collapse 
DAO. This mapper implementation would allow you to collapse the DAO layer (
i.e. get rid of it) while still maintaining a cleaner interface. You would 
still lose the advantage of DAO, but not all applications need DAO. 

This is another design alternative. It can be used with DAO, or without.


On 5/22/05, Aitor Imaz <aitor.imaz@gmail.com> wrote:
> So if I understand correctly, the mapper class will select the
> appropriate interface by looking at the statement name? It could by a
> nice addition, although I think it might have the risk of requiring too
> many interface files. Also, what would happen with the current SqlMap
> Dao templates?
> Aitor

View raw message