On Thu, Sep 16, 2004 at 07:49:17PM -0500, Spiegs wrote:
: What is the best approach for someone starting a new app? Is having all 
: of your model objects contain a transient static log instance, implement 
: Serializable, and implement HttpSessionActivationListener to 
: reinstantiate the log instance the best approach? What other approaches 
: would you recommend if you were to start with a clean slate?

What about, "don't store model objects[1] in session (or anyplace else
that may be serialized)?"  If you're passing data around, use a DTO.

Whether to use DTOs is something of a religious issue; but pure
data-holders rarely need internal logging.  If client code wants to log
a value they fetch out of a DTO, let them have at it...

-QM

[1] = This statement assumes any "model object" that requires internal
logging is much more than a pure data-holder.

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to