ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <dhsc...@cstone.dhs.state.il.us>
Subject Re: Advantage of Map over Bean as a parameterObject?
Date Tue, 05 Jul 2005 15:42:34 GMT
My 2 cents...your milage may vary.

We use maps exclusively.  I'm sure that custom beans perform "better",
but I doubt that would make any noticable difference to an end user - in
my experience the real performance killers in web apps are network
latency and having to use a low function, browser based, user interface.
 iBATIS is an awesome tool but it can't solve those problems -
unfortunately :-)

We wrote a subclass of HashMap that handles common houskeeping things
like string trimming and data type transformations (BigInteger-->Long,
etc.).  We use that class as the result class for all our queries.

In our situation, I don't see the value of adding lots (it would be
hundreds) of additional classes to our application that are basically
just DTOs.  I say this because our DB model is a far far different thing
than our object model and our mapping layer has to do transformations of
the DB "objects" into our domain objects somehow - either from maps, or
custom beans.  This DB design is not under our control (seperate DBA
group, political silos, etc.) - hence the vast difference in the models.
 If I had more control over the database design I might feel differently
- but I might use a more full function O-R mapper in that case too.

Before we used iBATIS, we used a home grown DAO framework that would
automagically generate CRUD methods and classes given a database schema.
 I even wrote a tool to generate the same stuff for iBATIS at one point.
 But we eventually decided that all the extra classes and generic CRUD
methods provided very little actual value to our application - so we
canned them all.

Jeff Butler


Mime
View raw message