search for books and compare prices
Tables of Contents for Refactoring
Chapter/Section Title
Page #
Page Count
Foreword
xiii
 
Preface
xv
 
What Is Refactoring?
xvi
 
What's in This Book?
xvii
 
Who Should Read This Book?
xviii
 
Building on the Foundations Laid by Others
xix
 
Acknowledgments
xix
 
Refactoring, a First Example
1
52
The Starting Point
1
6
The First Step in Refactoring
7
1
Decomposing and Redistributing the Statement Method
8
26
Replacing the Conditional Logic on Price Code with Polymorphism
34
18
Final Thoughts
52
1
Principles in Refactoring
53
22
Defining Refactoring
53
2
Why Should You Refactor?
55
2
When Should You Refactor?
57
3
What Do I Tell My Manager?
60
2
Problems with Refactoring
62
4
Refactoring and Design
66
3
Refactoring and Performance
69
2
Where Did Refactoring Come From?
71
4
Bad Smells in Code
75
14
Kent Beck
Martin Fowler
Duplicated Code
76
1
Long Method
76
2
Large Class
78
1
Long Parameter List
78
1
Divergent Change
79
1
Shotgun Surgery
80
1
Feature Envy
80
1
Data Clumps
81
1
Primitive Obsession
81
1
Switch Statements
82
1
Parallel Inheritance Hierarchies
83
1
Lazy Class
83
1
Speculative Generality
83
1
Temporary Field
84
1
Message Chains
84
1
Middle Man
85
1
Inappropriate Intimacy
85
1
Alternative Classes with Different Interfaces
85
1
Incomplete Library Class
86
1
Data Class
86
1
Refused Bequest
87
1
Comments
87
2
Building Tests
89
14
The Value of Self-testing Code
89
2
The JUnit Testing Framework
91
6
Adding More Tests
97
6
Toward a Catalog of Refactorings
103
6
Format of the Refactorings
103
2
Finding References
105
1
How Mature Are These Refactorings?
106
3
Composing Methods
109
32
Extract Method
110
7
Inline Method
117
2
Inline Temp
119
1
Replace Temp with Query
120
4
Introduce Explaining Variable
124
4
Split Temporary Variable
128
3
Remove Assignments to Parameters
131
4
Replace Method with Method Object
135
4
Substitute Algorithm
139
2
Moving Features Between Objects
141
28
Move Method
142
4
Move Field
146
3
Extract Class
149
5
Inline Class
154
3
Hide Delegate
157
3
Remove Middle Man
160
2
Introduce Foreign Method
162
2
Introduce Local Extension
164
5
Organizing Data
169
68
Self Encapsulate Field
171
4
Replace Data Value with Object
175
4
Change Value to Reference
179
4
Change Reference to Value
183
3
Replace Array with Object
186
3
Duplicate Observed Data
189
8
Change Unidirectional Association to Bidirectional
197
3
Change Bidirectional Association to Unidirectional
200
4
Replace Magic Number with Symbolic Constant
204
2
Encapsulate Field
206
2
Encapsulate Collection
208
9
Replace Record with Data Class
217
1
Replace Type Code with Class
218
5
Replace Type Code with Subclasses
223
4
Replace Type Code with State/Strategy
227
5
Replace Subclass with Fields
232
5
Simplifying Conditional Expressions
237
34
Decompose Conditional
238
2
Consolidate Conditional Expression
240
3
Consolidate Duplicate Conditional Fragments
243
2
Remove Control Flag
245
5
Replace Nested Conditional with Guard Clauses
250
5
Replace Conditional with Polymorphism
255
5
Introduce Null Object
260
7
Introduce Assertion
267
4
Making Method Calls Simpler
271
48
Rename Method
273
2
Add Parameter
275
2
Remove Parameter
277
2
Separate Query from Modifier
279
4
Parameterize Method
283
2
Replace Parameter with Explicit Methods
285
3
Preserve Whole Object
288
4
Replace Parameter with Method
292
3
Introduce Parameter Object
295
5
Remove Setting Method
300
3
Hide Method
303
1
Replace Constructor with Factory Method
304
4
Encapsulate Downcast
308
2
Replace Error Code with Exception
310
5
Replace Exception with Test
315
4
Dealing with Generalization
319
40
Pull Up Field
320
2
Pull Up Method
322
3
Pull Up Constructor Body
325
3
Push Down Method
328
1
Push Down Field
329
1
Extract Subclass
330
6
Extract Superclass
336
5
Extract Interface
341
3
Collapse Hierarchy
344
1
Form Template Method
345
7
Replace Inheritance with Delegation
352
3
Replace Delegation with Inheritance
355
4
Big Refactorings
359
20
Kent Beck
Martin Fowler
Tease Apart Inheritance
362
6
Convert Procedural Design to Objects
368
2
Separate Domain from Presentation
370
5
Extract Hierarchy
375
4
Refactoring, Reuse, and Reality
379
22
William Opdyke
A Reality Check
380
1
Why Are Developers Reluctant to Refactor Their Programs?
381
13
A Reality Check (Revisited)
394
1
Resources and References for Refactoring
394
1
Implications Regarding Software Reuse and Technology Transfer
395
2
A Final Note
397
1
References
397
4
Refactoring Tools
401
8
Don Roberts
John Brant
Refactoring with a Tool
401
2
Technical Criteria for a Refactoring Tool
403
2
Practical Criteria for a Refactoring Tool
405
2
Wrap Up
407
2
Putting It All Together
409
4
Kent Beck
References
413
4
List of Soundbites
417
2
Index
419