in reply to Re^17: Assignable Subroutines
in thread Assignable Subroutines
So lets refactor slightly and have a business level interface (where changes to salary require a reason). You may have several specific methods and probably one that says "just set it to this much and here's a piece of text for the audit log about why I did it". All of these will need to call the actuall Salary method on a lower level object and also put something in the log. It should not be the responsibilty of the Employee object to handle logging.
Moving away from Salary and business rules, it's quite possible that you just want to change a field's value without supplying any other information. As someone else pointed out, the object may then need to signal observers to update the gui or whatever but the thing requesting the change just wants to treat it like a struct.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^19: Assignable Subroutines
by dragonchild (Archbishop) on Jan 27, 2005 at 21:46 UTC |