ForewordbyRalphJohnson
ForewordbyMartinFowler
Preface
WhatisThisBookAbout?.
WhatAretheGoalsofThisBook?
WhoShouldReadThisBook?
WhatBackgroundDoYouNeed?
HowtoUseThisBook
TheHistoryofThisBook
StandingontheShouldersofGiants
Acknowledgments
Chapter1:WhyIWroteThisBook
Over-Engineering
ThePatternsPanacea
Under-Engineering
Test-DrivenDevelopmentandContinuousRefactoring
RefactoringandPatterns
EvolutionaryDesign
Chapter2:Refactoring
WhatIsRefactoring?
WhatMotivatesUstoRefactor?
ManyEyes
Human-ReadableCode
KeepingItClean
SmallSteps
DesignDebt
EvolvingaNewArchitecture
CompositeandTest-DrivenRefactorings
TheBenefitsofCompositeRefactorings
RefactoringTools
Chapter3:Patterns
WhatIsaPattern?
PatternsHappy
ThereAreManyWaystoImplementaPattern
Refactoringto,towards,andawayfromPatterns
DoPatternsMakeCodeMoreComplex?
PatternKnowledge
Up-FrontDesignwithPatterns
Chapter4:CodeSmells
DuplicatedCode
LongMethod
ConditionalComplexity
PrimitiveObsession
IndecentExposure
SolutionSprawl
AlternativeClasseswithDifferentInterfaces
LazyClass
LargeClass
SwitchStatements
CombinatorialExplosion
OddballSolution
Chapter5:ACatalogofRefactoringstoPatterns
FormatoftheRefactorings
ProjectsReferencedinThisCatalog
XMLBuilders
HTMLParser..
LoanRiskCalculator
AStartingPoint
AStudySequence
Chapter6:Creation
ReplaceConstructorswithCreationMethods
Motivation
Mechanics
Example
Variations
MoveCreationKnowledgetoFactory
Motivation
Mechanics
Example
EncapsulateClasseswithFactory
Motivation
Mechanics
Example
Variations
IntroducePolymorphicCreationwithFactoryMethod
Motivation
Mechanics
Example
EncapsulateCompositewithBuilder
Mechanics
Example
Variations
InlineSingleton
Motivation
Mechanics
Example
Chapter7:Simplification
ComposeMethod
Motivation
Mechanics
Example
ReplaceConditionalLogicwithStrategy
Motivation
Mechanics
Example
MoveEmbellishmenttoDecorator
Motivation
Mechanics
Example
ReplaceState-AlteringConditionalswithState
Motivation
Mechanics
Example
ReplaceImplicitTreewithComposite
Motivation
Mechanics
Example
ReplaceConditionalDispatcherwithCommand
Motivation
Mechanics
Example
Chapter8:Generalization
FormTemplateMethod
Motivation
Mechanics
Example
ExtractComposite
Motivation
Mechanics
Example
ReplaceOne/ManyDistinctionswithComposite
Motivation
Mechanics
Example
ReplaceHard-CodedNotificationswithObserver
Motivation
Mechanics
Example
UnifyInterfaceswithAdapter
Motivation
Mechanics
Example
ExtractAdapter
Motivation
Mechanics
Example
Variations
ReplaceImplicitLanguagewithInterpreter
Motivation
Mechanics
Example
Chapter9:Protection
ReplaceTypeCodewithClass
Motivation
Mechanics
Example
LimitInstantiationwithSingleton
Motivation
Mechanics
Example
IntroduceNullObject
Motivation
Mechanics
Example
Chapter10:Accumulation
MoveAccumulationtoCollectingParameter
Motivation
Mechanics
Example
MoveAccumulationtoVisitor
Motivation
Mechanics
Example
Chapter11:Utilities
ChainConstructors
Motivation
Mechanics
Example
UnifyInterfaces
Motivation
Mechanics
Example
ExtractParameter
Motivation
Mechanics
Example...
AfterwordbyJohnBrantandDonRoberts
References
Index