(this is my first post here so I appologize if this has already been discussed before)
I have an app where each user of the app are encapsulated in a User class. The problem is that certain functionality (such as searching for a user) does not require every single attribute of a user. As a result, I'm using objects that are much "heavier" than they should be for certain cases. I could create a LightWeughtUser class to use in these cases, but I'd like something a little more elegant. I don't want to end up down the road (as features are added to the app) with a LightWeightUser, a HeavyUser, MediumUser, etc. Anyone know of a
pattern or have ideas on how to solve this? Ideally, I'd like a sitution where I can just "grow" the object as needed. Thanks in advance for any help...just don't want to reinvent the wheel.
[ June 10, 2004: Message edited by: Michael J. Makunas ]