ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Munat <b...@munat.com>
Subject Re: How to make dao's / vo's more polymorphic
Date Tue, 14 Mar 2006 00:09:27 GMT
Actually, I've long been annoyed with all our frameworks forcing me to expose all my 
domain objects' fields via setters and getters. I've toyed with the idea of doing all my 
selects as maps (and my input from the UI layer too) and giving the domain objects the 
smarts to pick what they need out of the map. Haven't gotten around to trying it though as

I'm always on a team with other people and they think I'm crazy... the "bean" paradigm is

very entrenched. However, I'd say that before you go waving around the "best practices" 
ray gun, consider that java beans are hardly best OOP practice.

b

Clinton Begin wrote:
> 
> ...and by doing that lose all of the performance, type safety, context 
> and compatibility of a proper domain model.  While you're at it, why not 
> dispense with all other best practices as well.
> 
> Cheers,  ;-)
> Clinton
> 
> On 3/13/06, *netsql* <netsql@roomity.com <mailto:netsql@roomity.com>> wrote:
> 
>     You can do that and more including losly coupled by using a HashMap as
>     return type (return ArrayList of Maps from iBatis ) like I do. No more
>     out of sync beans.
> 
>     .V
> 
>     Paul Carr wrote:
>      >
>      >             Ideally I'd like all my DAO interfaces to extend a
>     BaseDAO
>      >             and all my
>      >             value objects to extend a BaseValueObject
>     automatically as
>      >             abator
>      >             creates them ???
>      >
>      >
> 
> 

Mime
View raw message