I'm looking for the best way to handle the situation where a particular
object represents a business entity is used for multiple purposes.

For example: A Person object.
In some cases I need a object that contains a great amount of detail about
a Person; say, name info, address, education background and detailed
buisness-centric information. This object is typically used for detailed
buisness logic processing. I also have a need for the the same entity just
serve the purpose of filling a drop down list with a list of First Name,
Last name for a UI selection.

In the first purpose I need a "full featured" object. In the second purpose
I do not. Also, performance is likely an issue here, as usual.

Question: Is there an OO pattern or concept that addresses these types of
requirements for design? I see the following patterns as possiblities.
Opinions please.

Builder pattern
Decorator pattern

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to