图书介绍

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

重构 改善既有代码的设计 评注版
  • 马丁·福勒(MartinFowler),肯特·贝克(KentBeck),约翰·布兰特(JohnBrant),威廉·奥迪克(WilliamOpdyke),唐·罗伯茨(DonRoberts)编著 著
  • 出版社: 北京:电子工业出版社
  • ISBN:9787121134500
  • 出版时间:2011
  • 标注页数:430页
  • 文件大小:31MB
  • 文件页数:454页
  • 主题词:机器代码程序-程序设计

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(新增批注共21条)1

The Starting Point2

The First Step in Refactoring9

Decomposing and Redistributing the Statement Method10

Replacing the Conditional Logic on Price Code with Polymorphism30

Final Thoughts41

Chapter 2 Principles in Refactoring(新增批注共1 1条)43

Defining Refactoring43

Why Should You Refactor?45

When Should You Refactor?48

What DO I Tell My Manager?51

Problems with Refactoring53

Refactoring and Design57

Refactoring and Performance60

Where Did Refactoring Come From?61

Chapter 3 Bad Smells in Code(by Kent Beck and Martin Fowler)(新增批注共17条)65

Duplicated Code66

Long Method67

Large Class70

Long Parameter List71

Divergent Change73

Shotgun Surgery74

Feature Envy74

Data Clumps75

Primitive Obsession76

Switch Statements76

Parallel Inheritance Hierarchies77

Lazy Class77

Speculative Generality78

Temporary Field78

Message Chains79

Middle Man81

Inappropriate Intimacy82

Alternative Classes with Different Interfaces82

Incomplete Library Class83

Data Class83

Refused Bequest84

Comments84

Chapter 4 Building Tests(新增批注共2条)87

The Value of Self.testing Code87

The JUnit Testing Framework89

Adding More Tests97

Chapter 5 Toward a Catalog of Refactorings(新增批注共1条)103

Format of the Refactorings103

Finding References105

How Mature Are These Refactorings?106

Chapter 6 Composing Methods(新增批注共9条)109

Extract Method110

Inline Method117

Inline Temp118

Replace Temp with Query119

Introduce Explaining Variable124

Split Temporary Variable128

Remove Assignments to Parameters130

Replace Method with Method Object134

Substitute Algorithm137

Chapter 7 Moving Features Between Objects(新增批注共12条)139

Move Method139

Move Field144

Extract Class147

Inline Class151

Hide Delegate153

Remove Middle Man156

Introduce Foreign Method158

Introduce Local Extension160

Chapter 8 Organizing Data(新增批注共9条)167

Self Encapsulate Field168

Replace Data Value with Object172

Change Value to Reference175

Change Reference to Value179

Replace Array with Object181

Duplicate Observed Data186

Change Unidirectional Association to Bidirectional194

Change Bidirectional Association to Unidirectional197

Replace Magic Number with Symbolic Constant200

Encapsulate Field201

Encapsulate Collection202

Replace Record with Data Class211

Replace Type Code with Class211

Replace Type Code with Subclasses217

Replace Type Code with State/Strategy220

Replace Subclass with Fields225

Chapter 9 Simplifying Conditional Expressions(新增批注共6条)229

Decompose Conditional229

Consolidate Conditional Expression231

Consolidate Duplicate Conditional Fragments234

Remove Contr01 Flag236

Replace Nested Conditional with Guard Clauses240

Replace Conditional with Polymorphism245

Introduce Null Object249

Introduce Assertion258

Chapter 10 Making Method Calls Simpler(新增批注共14条)263

Rename Method264

Add Parameter266

Remove Parameter267

Separate Query from Modifier269

Parameterize Method273

Replace Parameter with Explicit Methods277

Preserve Whole Object280

Replace Parameter with Method283

Introduce Parameter Object286

Remove Setting Method293

Hide Method296

Replace Constructor with Factory Method297

Encapsulate Downcast301

Replace Error Code with Exception303

Replace Exception With Test308

Chapter 11 Dealing with Generalization(新增批注共6条)313

Pull Up Field313

Pull Up Method315

Pull Up Constructor Body317

Push Down Method320

Push Down Field321

Extract Subclass322

Extract Superclass327

Extract Interface331

Collapse Hierarchy334

Form Template Method335

Replace Inheritance with Delegation342

Replace Delegation with Inheritance345

Chapter 12 Big Refactorings(by Kent Beck and Martin Fowler)(新增批注共11条)349

Tease Apart Inheritance351

Convert Procedural Design to Objects358

Separate Domain from Presentation363

Extract Hierarchy367

Chapter 13 Refaetoring,Reuse,and Reality(by William Opdyke)(新增批注共8条)373

A Reality Check374

Why Are Developers Reluctant to Refactor Their Programs?375

A Reality Check(Revisited)388

Resources and References for Refactoring389

Implications Regarding Software Reuse and Technology Transfer390

A Final Note391

References391

Chapter 14 Refactoring Tools(by Don Roberts and John Brant)395

Refactoring with a Tool395

Technical Criteria for a Refactoring Tool397

Practical Criteria for a Refactoring Tool399

Wrap Up401

Chapter 15 Putting It All Together(by Kent Beck)(新增批注共2条)403

References407

List of Soundbites411

Index413

热门推荐