S
Scott Balmos
Hi all,
I seem to have this problem no matter what OO-based language I'm using,
so this is probably not Java-specific. How much accessor/modifier
complexity do you put in your data objects? Do your data objects have
only the standard get/set combos for all data structures, or what
others do you add?
I wish I could provide a good example, but it's Monday, and the
flywheel in the brain is still spinning up to speed.
The best example I can think of is say you have a military personnel
app, with objects representing a soldier and their rank (ie class
Soldier has get/setRank). Would you put, say, function promote() in the
Soldier or Rank object class itself, or in the personnel-management
class(es), and have only get/set methods in Soldier and Rank?
It's this type of drawing the line at how much self-management a data
representation object should have that always trips me up.
Opinions appreciated. Thanks!
--Scott
I seem to have this problem no matter what OO-based language I'm using,
so this is probably not Java-specific. How much accessor/modifier
complexity do you put in your data objects? Do your data objects have
only the standard get/set combos for all data structures, or what
others do you add?
I wish I could provide a good example, but it's Monday, and the
flywheel in the brain is still spinning up to speed.
The best example I can think of is say you have a military personnel
app, with objects representing a soldier and their rank (ie class
Soldier has get/setRank). Would you put, say, function promote() in the
Soldier or Rank object class itself, or in the personnel-management
class(es), and have only get/set methods in Soldier and Rank?
It's this type of drawing the line at how much self-management a data
representation object should have that always trips me up.
Opinions appreciated. Thanks!
--Scott