struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Jalenak" <Jerry.Jale...@LABONE.com>
Subject [Best Practices] Use of Map as ValueObject
Date Thu, 31 Oct 2002 21:12:22 GMT
During a conversation with one of my programmers today, I mentioned that I
had begun using Maps instead of a ValueObject bean to pass basic data
elements between my Action, Business Logic, and DAO levels.  Coming back up
from a DAO I've tended to pass the ResultSet (or void) back to my Business
Logic.  In my Business Logic I instantiate a bean, populate it with the data
from the ResultSet, and pass it back to my Action.  The Action can then
store it in the request/session (as needed), and then forward to the
appropriate JSP.  I was asked what the advantages were to this approach, and
aside from not having to write ValueObject beans, I can't come up with a
good answer.  My question to the list then is this - Is this an appropriate
approach to passing simple data elements between application layers?  Is it
better to write ValueObject beans?  If so, why? 

I'm open to comments on this, as we are trying to standardize on how we pass
data around....

TIA,

Jerry Jalenak
Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496
jerry.jalenak@labone.com


This transmission (and any information attached to it) may be confidential and is intended
solely for the use of the individual or entity to which it is addressed. If you are not the
intended recipient or the person responsible for delivering the transmission to the intended
recipient, be advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is strictly prohibited.
If you have received this transmission in error, please immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message