dragonwell
Programmer
Adding features to existing application. Need to add a group of properties to business-entity object. Trying to decide if create additional object and use composition or just add new properties to existing object. Reason wondering is this is a very primary object, which gets queried very frequently, but the new set of preperties are not used that much and would be a waste loading them every time.
Say it's a User object. Now we need to add more properties to user that are only used in part of app. Should I just add all the new properties to the User and just accept the performance hit of loading those every time, or create a UserProfile object to contain the new properties and contain this as a member in User?
Say it's a User object. Now we need to add more properties to user that are only used in part of app. Should I just add all the new properties to the User and just accept the performance hit of loading those every time, or create a UserProfile object to contain the new properties and contain this as a member in User?