ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankar" <fatboys...@gmail.com>
Subject Re: iBATIS DAO vs SqlMapClientDaoSupport
Date Mon, 12 Jan 2009 22:42:19 GMT
I guess I missed this one. But why do u need to use
applicationContext.getBean. Those are ancient man. With Spring Annotations
(check the 2.5+ documentation), U hardly need xmls and all of this crappy
code.
I am not sure if that and the need for those huge amounts of xmls worried u
about Spring as such. But Those were my $0.02 about the same.

-S

On Mon, Jan 12, 2009 at 2:54 PM, Chris O'Connell <
oconnell@gorillachicago.com> wrote:

> I have used Spring to configure multiple instances of the same set of DAO's
> to hit different databases.  Right there Spring has a huge advantage over
> having to hardcode a specific config file right into the code.  Also, using
> DI makes it easier to code against interfaces and let Spring worry about
> having to instantiate the correct instance of that interface.  You haven't
> indicated anything about who is actually going to be creating all the
> objects you will be needing.  I'm a big fan of the rule that code should
> either use an object or create it, but not both.  That doesn't necessarily
> have anything to do with iBatis, but Spring's DI certainly makes that
> easier.
>
> Once again, if Spring doesn't solve any of your problems, don't use it.
> But your reasons for not using it seem a little inconsistent.  You state
> that the only thing that Spring would do for you is allow you to use a
> Spring utility class.  But you then state that you don't want to use DI
> because you don't want clients of your API to depend on Spring.  Well, those
> things really are independent of each other.  I have nothing to gain by you
> using Spring, but you might want to take another look at what Spring really
> does before you decide you don't want to use it.
>

Mime
View raw message