Steps to eliminate old code
Posted by mholmes on 21 Sep 2010 in Activity log
These are the steps, and my progress through them:
- DONE: Start with
MdhRecordList
, and ensure that nothing can set the value of$parentSuffix
to anything except an empty string. Test thoroughly. - DONE: Next, move to
MdhRecord
, and ensure that nothing can set its$parentSuffix
to anything but an empty string. Test again. - DONE: If all is well, eliminate all uses of
$parentSuffix
fromMdhRecordList
and test again. This will leave the class making calls toMdhRecord
methods where it supplies an empty string in place of its$parentSuffix
. - DONE: Identify those methods in
MdhRecord
, and refactor them so that they don't require that parameter; then remove it from all calls to the methods. Test very thoroughly. - DONE: Remove all remaining code from
MdhRecordList
which references$parentSuffix
, and test again. - DONE: Remove all code referencing
$parentSuffix
fromMdhRecord
, and test again. - DONE: Examine
gui.js
. This has functions which look for the parent suffix and use it (although I believe it's always an empty string) to build ids for form elements and querystring parameters. Remove all references to it, and test again. - DONE: Look at get_rec.php and save_rec.php to see if mentions of suffixes and ids there can now be simplified.
- DONE: Test test test test...