Articles »

Suppose you have a God class that is full of ifs and case statements, or boolean flags. Many refactorings try to segregate responsibilities in smaller entities: methods, subclasses, or collaborators.

One option for starting to break up the class is based on inheritance. The end result is many little subclasses, each modelling a special case which was submerged in the original giant class.
Posted by girish.r 1328 days ago (
Discuss  | Bury | Tweet This | Tagged: practical php refactoring extract hierarchy
Add To 

Who Voted for this Story


No one has commented on this article yet.

Log in to comment or register here.