Refactoring_ImprovingtheDesignofExisting.epub - (EPUB全文下载)

文件大小:1.08 mb。
文件格式:epub 格式。
书籍内容:

Refactoring: Improving the Design of Existing Code
Martin FowlerKent BeckJohn BrantWilliam OpdykeDon Roberts
Boston • San Francisco • New York • Toronto • MontrealLondon • Munich • Paris • MadridCapetown • Sydney • Tokyo • Singapore • Mexico City
Table of Contents
Copyright
Foreword
Preface
What Is Refactoring?
What's in This Book?
Who Should Read This Book?
Building on the Foundations Laid by Others
Acknowledgments
Chapter 1. Refactoring, a First Example
The Starting Point
The First Step in Refactoring
Decomposing and Redistributing the Statement Method
Replacing the Conditional Logic on Price Code with Polymorphism
Final Thoughts
Chapter 2. Principles in Refactoring
Defining Refactoring
Why Should You Refactor?
Refactoring Helps You Find Bugs
When Should You Refactor?
What Do I Tell My Manager?
Problems with Refactoring
Refactoring and Design
Refactoring and Performance
Where Did Refactoring Come From?
Chapter 3. Bad Smells in Code
Duplicated Code
Long Method
Large Class
Long Parameter List
Divergent Change
Shotgun Surgery
Feature Envy
Data Clumps
Primitive Obsession
Switch Statements
Parallel Inheritance Hierarchies
Lazy Class
Speculative Generality
Temporary Field
Message Chains
Middle Man
Inappropriate Intimacy
Alternative Classes with Different Interfaces
Incomplete Library Class
Data Class
Refused Bequest
Comments
Chapter 4. Building Tests
The Value of Self-testing Code
The JUnit Testing Framework
Adding More Tests
Chapter 5. Toward a Catalog of RefactoringsFormat of the Refactorings
Finding References
How Mature Are These Refactorings?
Chapter 6. Composing Methods
Extract Method
Inline Method
Inline Temp
Replace Temp with Query
Introduce Explaining Variable
Split Temporary Variable
Remove Assignments to ParametersReplace Method with Method Object
Substitute Algorithm
Chapter 7. Moving Features Between Objects
Move Method
Move Field
Extract Class
Inline Class
Hide Delegate
Remove Middle Man
Introduce Foreign Method
Introduce Local Extension
Chapter 8. Organizing Data
Self Encapsulate Field
Replace Data Value with Object
Change Value to Reference
Change Reference to Value
Replace Array with Object
Duplicate Observed Data
Change Unidirectional Association to Bidirectional
Change Bidirectional Association to Unidirectional
Replace Magic Number with Symbolic Constant
Encapsulate Field
Encapsulate Collection
Replace Record with Data Class
Replace Type Code with Class
Replace Type Code with Subclasses
Replace Type Code with State/Strategy
Replace Subclas ............

书籍插图:
书籍《Refactoring_ImprovingtheDesignofExisting.epub》 - 插图1
书籍《Refactoring_ImprovingtheDesignofExisting.epub》 - 插图2

以上为书籍内容预览,如需阅读全文内容请下载EPUB源文件,祝您阅读愉快。

版权声明:书云(openelib.org)是世界上最大的在线非盈利图书馆之一,致力于让每个人都能便捷地了解我们的文明。我们尊重著作者的知识产权,如您认为书云侵犯了您的合法权益,请参考版权保护声明,通过邮件openelib@outlook.com联系我们,我们将及时处理您的合理请求。 数研咨询 流芳阁 研报之家 AI应用导航 研报之家
书云 Open E-Library » Refactoring_ImprovingtheDesignofExisting.epub - (EPUB全文下载)