A few things - it lets you use different implementations - like if you
need to use jdbc or hibernate you could theoretically swap the impl
and keep the remainder of the code intact.

Because of that, it also simplifies testing - you can use mock dao
classes if you want. (I guess since you are using spring, you can use
it's transaction aware testing stuff - it's pretty slick).

Also, if you are using JDK5, you can use a generic base class then
provide the data type in the subclass - it makes 99% of the code go
away, but still gives you the ability to add stuff to individual daos.

Larry


On 4/12/07, Osborn Tamara I Contractor 10 CS/SCA
<[EMAIL PROTECTED]> wrote:


I'm a newbie so please forgive this general question. I am testing an
implementation of iBATIS with Spring DAOs using the interface/implements
pattern. I was asked what purpose the interfaces serve since I have a 1
implementation for each interface. Every example I have seen has this
structure but I haven't found documentation explaining why. Can anyone give
me information or references so I can research this?



I appreciate your help.



Tammy Osborn

Reply via email to