ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick R <ric...@gmail.com>
Subject Re: iBatis 3.0 minimal complete example
Date Thu, 11 Feb 2010 04:40:05 GMT
On Wed, Feb 10, 2010 at 11:18 PM, Zoran Avtarovski
<zoran@sparecreative.com> wrote:
>
> To be honest I think the choice of front end matters little. The key aspect is the data
layer - IB3 and any dependency injection used.
>
> I think one example using spring and another using Guice is more than enough.

Yea, I don't see why the front end matters at all either, unless you
plan on demonstrating the handling the transaction demarcation in the
servlet layer of a webapp.I like to have all my ibatis stuff in its
own self contained jar since I never know what's going to end up using
it within the company so I handle all my transactions closer to the
fire.

[OT]:
Concerning the DI stuff, yea yea I know I'm in the minority that
thinks DI is way over rated. I like the aspect oriented parts of
things like Spring and Guice (transaction demarcation), but for pure
DI (injecting an implementation) I still don't get all the hype. Yes,
I know it's supposed to help with testing, which actually seems to be
the ONLY place people seem to ever mention its primary use, but even
there I guess I'm lazy since I don't care about sending in mock
objects to my java persistence methods. Not that I don't test, I just
suppose I don't test down to the level of mock objects. I want to be
sure my ibatis services work though - so for that just using a
different datasource in my properties file suffices. (The other area I
could see it helping a bit is if you need to compile different builds
with different implementations - you could have different xml files
that get used for doing your builds. How common is this though -
certainly not very.) Feel free to let me know off-list how DI has
'really' helped - not some mythical Spinal Tap "Well this one goes to
11" argument.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message