图书介绍

重构 改善既有代码的设计 英文注释版PDF|Epub|txt|kindle电子书版本网盘下载

重构 改善既有代码的设计 英文注释版
  • (美)福勒(Martin Fowler)著 著
  • 出版社: 北京:人民邮电出版社
  • ISBN:7115168040
  • 出版时间:2008
  • 标注页数:471页
  • 文件大小:31MB
  • 文件页数:490页
  • 主题词:软件开发-英文

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

重构 改善既有代码的设计 英文注释版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

Chapter 1: Refactoring, a First Example重构,第一个例子1

The Starting Point起点1

The First Step in Refactoring重构第一步7

Decomposing and Redistributing the Statement Method分解并重组statement方法8

Replacing the Conditional Logic on Price Code with Polymorphism用多态代替价格条件逻辑代码34

Final Thoughts结语52

Chapter 2: Principles in Refactoring重构原则53

Defining Refactoring何谓重构53

Why Should You Refactor?为何重构55

When Should You Refactor?何时重构57

What Do I Tell My Manager?怎样说服经理60

Problems with Refactoring重构的问题62

Refactoring and Design重构与设计66

Refactoring and Performance重构与性能69

Where Did Refactoring Come From?重构的起源71

Chapter 3: Bad Smells in Code(byKent Beck and Martin Fowler)代码坏味75

Duplicated Code重复代码76

Long Method过长方法76

Large Class过长类78

Long Parameter List过长参数列表78

Divergent Change发散式变化79

Shotgun Surgery霰弹式修改80

Feature Envy特性依恋80

Data Clumps数据泥团81

Primitive Obsession基本类型偏执81

Switch Statements switch语句82

Parallel Inheritance Hierarchies平行继承体系83

Lazy Class 冗余类83

Speculative Generality理论上的一般性83

Temporary Field临时字段84

Message Chains消息链84

Middle Man中间人85

Inappropriate Intimacy过度亲密85

Alternative Classes with Different Interfaces接口不同的等效类85

Incomplete Library Class不完整的库类86

Data Class数据类86

Refused Bequest拒绝继承87

Comments注释过多87

Chapter 4: Building Tests构建测试89

The Value of Self-testing Code自测试代码的重要性89

The JUnit Testing Framework JUnit测试框架91

Adding More Tests添加更多测试97

Chapter 5: Toward a Catalog of Refactorings重构目录103

Format of the Refactorings重构描述的格式103

Finding References寻找引用105

How Mature Are These Refactorings?这些重构的成熟度如何106

Chapter 6: Composing Methods组合方法109

Extract Method提取方法110

Inline Method内联方法117

Inline Temp内联临时变量119

Replace Temp with Query①用查询方法代替临时变量120

Introduce Explaining Variable引入解释性变量124

Split Temporary Variable分离临时变量128

Remove Assignments to Parameters去除参数赋值131

Replace Method with Method Object用方法对象代替方法135

Substitute Algorithm替换算法139

Chapter 7: Moving Features Between Objects在对象之间移动特性141

Move Method移动方法142

Move Field移动字段146

Extract Class提取类149

Inline Class内联类154

Hide Delegate隐藏委托类157

Remove Middle Man去除中间人160

Introduce Foreign Method引入外加方法162

Introduce Local Extension引入本地扩展类164

Chapter 8: Organizing Data组织数据169

Self Encapsulate Field自封装字段171

Replace Data Value with Object用对象代替数据值175

Change Value to Reference将值对象改为引用对象179

Change Reference to Value将引用对象改为值对象183

Replace Array with Object用对象代替数组186

Duplicate Observed Data重复被观察数据189

Change Unidirectional Association to Bidirectional将单向关联改为双向197

Change Bidirectional Association to Unidirectional将双向关联改为单向200

Replace Magic Number with Symbolic Constant用字面常量代替魔数204

Encapsulate Field封装字段206

Encapsulate Collection封装集合208

Replace Record with Data Class用数据类代替记录217

Replace Type Code with Class用类代替类型码218

Replace Type Code with Subclasses用子类代替类型码223

Replace Type Code with State/Strategy用State/Strategy代替类型码227

Replace Subclass with Fields用字段代替子类232

Chapter 9: Simplifying Conditional Expressions简化条件语句237

Decompose Conditional分解条件语句238

Consolidate Conditional Expression合并条件语句240

Consolidate Duplicate Conditional Fragments合并重复的条件片段243

Remove Control Flag去除控制标志245

Replace Nested Conditional with Guard Clauses用守卫语句代替嵌套条件语句250

Replace Conditional with polymorphism用多态代替条件语句255

Introduce Null Object引入Null对象260

Introduce Assertion引入断言267

Chapter 10: Making Method Calls Simpler简化方法调用271

Rename Method重命名方法273

Add Parameter添加参数275

Remove Parameter去除参数277

Separate Query from Modifier将查询方法与修改方法分离279

Parameterize Method参数化方法283

Replace Parameter with Explicit Methods用显式方法代替参数285

Preserve Whole Object保持对象完整288

Replace Parameter with Method用方法代替参数292

Introduce Parameter Object引入参数对象295

Remove Setting Method去除设置方法300

Hide Method隐藏方法303

Replace Constructor with Factory Method用工厂方法代替构造器304

Encapsulate Downcast封装向下转型308

Replace Error Code with Exception用异常代替错误码310

Replace Exception with Test用测试代替异常315

Chapter 11: Dealing with Generalization处理泛化关系319

Pull Up Field上移字段320

Pull Up Method上移方法322

Pull Up Constructor Body上移构造器主体325

Push Down Method下移方法328

Push Down Field下移字段329

Extract Subclass提取子类330

Extract Superclass提取超类336

Extract Interface提取接口341

Collapse Hierarchy合并继承层次344

Form Template Method形成Template Method345

Replace Inheritance with Delegation用委托代替继承352

Replace Delegation with Inheritance用继承代替委托355

Chapter 12: Big Refactorings (byKent Beck and Martin Fowler)大型重构359

Tease Apart Inheritance分解继承层次362

Convert Procedural Design to Objects将过程式设计转换为面向对象368

Separate Domain from Presentation将领域逻辑与表现分离370

Extract Hierarchy提取继承层次375

Chapter 13: Refactoring, Reuse, and Realiry(byWilliam Opdyke)重构,复用与现实379

A Reality Check现实的检验380

Why Are Developers Reluctant to Refactor Their Programs?开发人员为何不愿重构程序381

A Realiry Check (Revisited)再谈现实的检验394

Resources and References for Refactoring重构的资源和参考文献394

Implications Regarding Software Reuse and Technology Transfer对软件复用与技术传播的意义395

A Final Note结语397

References参考文献397

Chapter 14: Refactoring Tools (byDon Roberts and John Brant)重构工具401

Refactoring with a Tool使用工具重构401

Technical Criteria for a Refactoring Tool重构工具的技术标准403

Practical Criteria for a Refactoring Tool重构工具的实用标准405

Wrap Up结语407

Chapter 15: Putting It All Together(byKent Beck)集大成409

References参考文献413

List of Soundbites要点列表417

Updates更新内容419

Index索引459

热门推荐