> The question I have is when generating a List to display the beans is
> it really that bad to use the actual Data Transfer objects beans in
> the display (vs a List of the DynaFormBeans)? The reason I ask is it
> seems like a lot of overhead to convert a Collection of data transfer
> objects into a whole new collection of DynaFormBeans, especially if
> the List is quite large. The problem though is if you use the DTOs you
> have to code in those beans proper formats for displaying such things
> as Dates.
> How do others handle this situation?

I'm not clear on your issue... when would you need a list of *Form* beans?
I'm generally working with a single Form in scope.  (But I don't use
Dyna-anythings yet.)

I don't know if it's an official pattern, but I've heard it called "Custom
Data Transfer Objects".  IOW, if all you're doing is presenting a read-only
page of items, from which the user will pick one and go off and edit it,
then just get the data out and into some format from which it's easy to
display.

I have a 'dto' package which has the beans that are really intended to
transport data in both directions.  Then I have 'dto.custom' in which all
the classes are named with "View" in the name.  These are only for display.
In the custom package, all the dates are just Strings, since I never have to
worry about validating them.  I also put "description" fields in, rather
than just the codes that are stored in the database, because I need to
display things like "NM - No Mail". 

HTH, not sure I'm on the same page though. :)

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

Reply via email to