For a product that I am working on in my spare time I looking for feedback
from the community on thoughts/ideas/opinions about the pros and cons of how to
store DTO values inside a business entity.
Here is the architecture that I am working with:
I have business/domain entities that will be used to hold onto and
perform any business/domain logic and these business entities will be populated
with a DTO (possible multiple DTO's if the business entity requires it). When I
am building/populating my entity with the given DTO I have one of two
choices.
Choice 1) Pass in the DTO and then go through and perform
value assignments from the DTO into the entity.
Choice 2) Pass in the DTO and then store that DTO inside the
entity and simply have the values of the DTO be accessed via pass throughs.
Choice 3) Is there a choice 3?
I have done both ways in the past and each have their own pro's and con's, I
am just looking for community feedback as to what way is deemed to be 'best
practice'.
Thanks for your feedback
Posted
06-06-2007 7:09 AM
by
Derik Whittaker