Replace Type Code With Class

See MartinFowler's site at http://refactoring.com/catalog/replaceTypeCodeWithClass.html


One potential problem with the blood-type example is that the "types" may be managed and entered by non-programmers. If every time a "type" needs to be created or changed, and a call to a programmer must go out, it could slow up productivity and cost the org. Blood types do not change that often, but each domain category is different. Be careful before making every category into class set: have a reason to do it first, not just because "Mr. Fowler said so". Related: CompilingVersusMetaDataAid --Top


CategoryConditionalsAndDispatching


EditText of this page (last edited September 29, 2011) or FindPage with title or text search