Refactoring: improving the design of existing code

"Refactoring: Improving the Design of Existing Code" Editor's Recommendation: Refactoring, in a word, is the methodical improvement of code without changing external behavior. Many years ago, it was the publication of the original version of "Refactoring: Improving the Design of Existing Code" that made refactoring finally come out of the small circle of programming experts and become an indispensable part of the daily development work of many ordinary programmers. "Refactoring: Improving the Design of Existing Code" has therefore become a classic book with the same name as "Design Patterns". It has been translated into many languages ​​such as Chinese, German, Russian, and Japanese, and it is sold well all over the world.

"Refactoring: Improving the Design of Existing Code" embodies the valuable experience gained by experts in the software development community for many years, and has a value that will not be erased by the passage of time. Today, both refactoring itself, the industry's understanding of refactoring, and the strength of development tools' support for refactoring are not the same as when "Refactoring: Improving the Design of Existing Code" was originally published. The meaning and essence of the connotation are still worthy of repeated chewing, and can often be read and new.

"Refactoring: Improving the Design of Existing Code" clearly exposes the process of refactoring, explains the principles and best practices of refactoring, and shows when and where to start mining code for improvement. The book presents more than 70 viable refactorings, each introducing the motivation and techniques for a proven code transformation approach. The refactoring guidelines presented in Refactoring: Improving the Design of Existing Code will help you change your code one small step at a time, reducing risk during development.

"Refactoring: Improving the Design of Existing Code" is suitable for software developers, project managers, etc. to read, and can also be used as a reference for teachers and students of computer and related majors in colleges and universities.

Refactoring: improving the design of existing code

"Refactoring: Improving Existing Code Design" Reading Notes  http://www.linuxidc.com/Linux/2014-08/105066.htm

content

Chapter 1 Refactoring, the first case
1.1 The starting point
1.2 The first step of refactoring
1.3 Decomposing and reorganizing the Statemen
1.4 Using polymorphism to replace conditional logic related to price
1.5 Conclusion
Chapter 2 Refactoring principles
2.1 What is refactoring
2.2 Why refactoring
2.3 When Refactoring
2.4 What to Say to Managers
2.5 Refactoring Difficulties
2.6 Refactoring and Design
2.7 Refactoring and Performance
2.8 Where Refactoring Originates
Chapter 3 Bad Smell of
Code 3.1 Duplicated Code
3.2 Long Method )
3.3 Large Class
3.4 Long Parameter List
3.5 Divergent Change
3.6 Shortgun Surgery
3.7 Feature Envy
3.8 Data Clumps
3.9 Primitive Obsession (basic type paranoia)
3.10 Switch Statements (switch thriller)
3.11 Parallel Inheritance Hierarchies (parallel inheritance system)
3.12 Lazy Class (redundant class)
3.13 Speculative Generality
3.14 Temporary Field
3.15 Message Chai
3.16 Middle Man
3.17 Inappropriate Intimacy
3.18 Alternative Classes with Different Interfaces
3.19 Incomplete Library Class
3.20 Data Class
3.21 Refused Bequest
3.22 Comments
Chapter 4 Building Tests Architecture
4.1 The Value of Self-Testing Code
4.2 The JUnit Test Framework
4.3 Adding More Tests
Chapter 5 Refactoring List
5.1 Refactoring Record Format
5.2 Finding Reference Points
5.3 How Mature Are These Refactoring Guidelines
Chapter 6 Reorganizing Your Functions
6.1 Extract Method ( Extract function)
6.2 Inline Method (inline function)
6.3 Inline Temp (inline temporary variable)
6.4 Replace Temp With Query (replace temporary variable with query)
6.5 Introduce Explaining Variable
6.6 Split Temporary Variable
6.7 Remove Assignments to Paramete
6.8 Replace Method with Method Object
6.9 Substitute Algorithm Replace Your Algorithm)
Chapter 7 Moving Features Between Objects
7.1 Move Method
7.2 Move Field
7.3 Extract Class
7.4 Inline Class
7.5 Hide Delegate (
7.6 Remove Middle Man
7.7 Introduce Foreign Method
7.8 Introduce Local Exte ion Chapter
8 Reorganizing Your Data
8.1 Self Encapsulate Field
8.2 Replace Data Value with Object 8.3 Change Value to
Reference
8.4 Change Reference to Value 8.4 Change Reference to Value
8.5 Replace Array with Object
8.6 Duplicate Observed Data
8.7 Change Unidirectional Association to Bidirectional
8.8 Change Bidirectional Association to Unidirectional 8.9
Replace Magic Number with Symbolic Co tant
8.10 Encapsulate Field
8.11 Encapsulate Collection
8.12 Replace Record with Data Class 8.12 Replace Record with Data Class
8.13 Replace Type Code with Class
8.14 Replace Type Code with Subclasses
8.15 Replace Type Code with State/Strategy
8.16 Replace Subclass with Fields (replacing subclasses with value fields)
Chapter 9 Simplifying Conditional Expressions
9.1 Decompose Conditional
9.2 Co olidate Conditional Expression
9.3 Co olidate Duplicate Conditional Fragments
9.4 Remove Control Flag
9.5 Replace Nested Conditional with Guard Clauses
9.6 Replace Conditional with Polymorphism 9.7
Introduce Null Object
9.8 Introduce Assertion
Chapter 10 Simplifying Function Calls
10.1 Rename Method
10.2 Add Parameter
10.3 Remove Parameter
10.4 Separate Query from Modifier (separate query function and modifier function)
10.5 Parameterize Method (make the function carry parameters)
10.6 Replace Parameter with Explicit Methods (replace parameters with explicit functions)
10.7 Preserve Whole Object (keep the object intact)
10.8 Replace Parameter with Method function instead of parameters)
10.9 Introduce Parameter Object
10.10 Remove Setting Method
10.11 Hide Method
10.12 Replace Co tructor with Factory Method
10.13 Encapsulate Downcast
10.14 Replace Error Code with Exception
10.15 Replace Exception with Test
Chapter 11 Dealing with General Relationships
11.1 Pull Up Field
11.2 Pull Up Method
11.3 Pull Up Co tructor Body (constructor body moves up)
11.4 Push Down Method (function moves down)
11.5 Push Down Field (value range moves down)
11.6 Extract Subclass (refines subclass)
11.7 Extract Superclass (refines superclass)
11.8 Extract Interface (refines interface ) )
11.9 Collapse Hierarchy
11.10 Form Template Method
11.11 Replace Inheritance with Delegation
11.12 Replace Delegation with Inheritance
Chapter 12 Large Refactoring
12.1 Tease Apart Inheritance
12.2 Convert Procedural Design to Objects
12.3 Separate Domain from Presentation (Separate Domain and Representation/Display)
12.4 Extract Hierarchy
Chapter 13 Refactoring, Reuse, and Reality
13.1 Reality Checking
13.2 Why Developers Won't Refactor Their Programs
13.3 Reality Checking
13.4 Refactoring
13.5 From Refactoring Association to Software Reuse and Technology Dissemination
13.6 Conclusion
13.7 References Chapter
14 Refactoring Tools
14.1 Refactoring Using Tools
14.2 Technical Standards for
Refactoring Tools 14.3 Practical Standards for Refactoring Tools
14.4 Summary
Chapter 15 Chapter Summary
Bibliography
Highlights List
Index

Refactoring: Improving the Design of Existing Code Chinese PDF clear version  download:

Baidu network disk free download address: http://pan.baidu.com/s/1V5ng

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326394868&siteId=291194637