ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Advantage of Map over Bean as a parameterObject?
Date Sun, 03 Jul 2005 05:16:25 GMT
There's only one advantage:

1) You don't have to write a JavaBean class.

But JavaBeans have many advantages over Maps:

1) Performance. Beans are fast, Maps are slow.

2) Type safety. Beans are typesafe, Maps are ambiguous.

3) Predictability. Beans are predictable, Maps are like a box of chocolates, 
you never know what you're going to get.

4) Compatibility. Beans are compatible with many frameworks and tools, Maps 
may or may not be.

5) Safety. Beans can be written to encapsulate the data and behaviors that 
you want.

6) ....

Could go all day. Use beans. Maps are supported for convenience only.


On 7/2/05, Folashade Adeyosoye <shardayyy@gmail.com> wrote:
>  What are they?

View raw message