网站首页  软件下载  游戏下载  翻译软件  电子书下载  电影下载  电视剧下载  教程攻略

请输入您要查询的图书:

 

书名 重构--改善既有代码的设计(评注版)/传世经典书丛
分类
作者 (美)福勒
出版社 电子工业出版社
下载
简介
编辑推荐

Martin Fowler和本书另几位作者清楚揭示了重构过程,他们为面向对象软件开发所做的贡献难以衡量。《重构——改善既有代码的设计(评注版)》解释了重构的原理和最佳实践,并指出何时何地你应该开始挖掘你的代码以求改善。本书的核心是一系列完整的重构方法,其中每一项都介绍一种经过实践检验的代码变换手法的动机和技术。某些项目如Extract Method和Move Field看起来可能很浅显,但不要掉以轻心,因为理解这类技术正是有条不紊地进行重构的关键。本书所提的这些重构手法将帮助你一次一小步地修改你的代码,这就减少了过程中的风险。很快你就会把这些重构手法和其名称加入自己的开发词典中,并且朗朗上口。

内容推荐

重构,一言以蔽之,就是在不改变外部行为的前提下,有条不紊地改善代码。多年前,正是本书原版的出版,使重构终于从编程高手们的小圈子走出,成为众多普通程序员日常开发工作中不可或缺的一部分。本书也因此成为与《设计模式》齐名的经典著作,被译为中、德、俄、日等众多语言,在世界范围内畅销不衰。

Martin Fowler等著的《重构——改善既有代码的设计(评注版)》凝聚了软件开发社区专家多年摸索而获得的宝贵经验,拥有不因时光流逝而磨灭的价值。今天,无论是重构本身,业界对重构的理解,还是开发工具对重构的支持力度,都与本书最初出版时不可同日而语,但书中所蕴涵的意味和精华,依然值得反复咀嚼,而且往往能够常读常新。

《重构——改善既有代码的设计(评注版)》力邀国内资深专家执笔,在英文原著基础上增加中文点评与注释,旨在以先行者的学研心得与实践感悟,对读者阅读与学习加以点拨、指明捷径。

目录

Chapter 1 Refactoring, a First Example(新增批注共21条)/1

 The Starting Point/2

 The First Step in Refactoring/9

 Decomposing and Redistributing the Statement Method/10

 Replacing the Conditional Logic on Price Code with Polymorphism/30

 Final Thoughts/41

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

 Defining Refactoring/43

 Why Should You Refactor?/45

 When Should You Refactor?/48

 What DO I Tell My Manager?/51

 Problems with Refactoring/53

 Refactoring and Design/57

 Refactoring and Performance/60

 Where Did Refactoring Come From?/61

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

 Duplicated Code/66

 Long Method/67

 Large Class/70

 Long Parameter List/71

 Divergent Change/73

 Shotgun Surgery/74

 Feature Envy/74

 Data Clumps/75

 Primitive Obsession/76

 Switch Statements/76

 Parallel Inheritance Hierarchies/77

 Lazy Class/77

 Speculative Generality/78

 Temporary Field/78

 Message Chains/79

 Middle Man/81

 Inappropriate Intimacy/82

 Alternative Classes with Different Interfaces/82

 Incomplete Library Class/83

 Data Class/83

 Refused Bequest/84

 Comments/84

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

 The Value of Self.testing Code/87

 The JUnit Testing Framework/89

 Adding More Tests/97

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

 Format of the Refactorings/103

 Finding References/105

 How Mature Are These Refactorings?/106

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

 Extract Method/11O

 Inline Method/117

 Inline Temp/118

 Replace Temp with Query/119

 Introduce Explaining Variable/124

 Split Temporary Variable/128

 Remove Assignments to Parameters/130

 Replace Method with Method Object/134

 Substitute Algorithm/137

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

 Move Method/139

 Move Field/144

 Extract Class/147

 Inline Class/151

 Hide Delegate/153

 Remove Middle Man/156

 Introduce Foreign Method/158

 Introduce Local Extension/160

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

 Self Encapsulate Field/168

 Replace Data Value with Object/172

 Change Value to Reference/175

 Change Reference to Value/179

 Replace Array with Object/181

 Duplicate Observed Data/186

 Change Unidirectional Association to Bidirectional/194

 Change Bidirectional Association to Unidirectional/197

 Replace Magic Number with Symbolic Constant/200

 Encapsulate Field/201

 Encapsulate Collection/202

 Replace Record with Data Class/211

 Replace Type Code with Class/211

 Replace Type Code with Subclasses/217

 Replace Type Code with State/Strategy/220

 Replace Subclass with Fields/225

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

 Decompose Conditional/229

 Consolidate Conditional Expression/231

 Consolidate Duplicate Conditional Fragments/243

 Remove Contr01 Flag/236

 Replace Nested Conditional with Guard Clauses/240

 Replace Conditional with Polymorphism/245

 Introduce Null Object/249

 Introduce Assertion/258

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

 Rename Method/264

 Add Parameter/266

 Remove Parameter/267

 Separate Query from Modifier/269

 Parameterize Method/273

 Replace Parameter with Explicit Methods/277

 Preserve Whole Object/280

 Replace Parameter with Method/283

 Introduce Parameter Object/286

 Remove Setting Method/293

 Hide Method/296

 Replace Constructor with Factory Method/297

 Encapsulate Downcast/301

 Replace Error Code with Exception/303

 Replace Exception With Test/308

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

 Pull Up Field/313

 Pull Up Method/315

 Pull Up Constructor Body/317

 Push Down Method/320

 Push Down Field/321

 Extract Subclass/322

 Extract Superclass/327

 Extract Interface/331

 Collapse Hierarchy/334

 Form Template Method/335

 Replace Inheritance with Delegation/342

 Replace Delegation with Inheritance/345

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

 Tease Apart Inheritance/351

 Convert Procedural Design to Objects/358

 Separate Domain from Presentation/363

 Extract Hierarchy/357

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

 A Reality Check/374

 Why Are Developers Reluctant to Refactor Their Programs?/375

 A Reality Check (Revisited)/388

 Resources and References for Refactoring/389

 Implications Regarding Software Reuse and Technology Transfer/390

 A Final Note/391

 References/391

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

 Refactoring with a Tool/395

 Technical Criteria for a Refactoring Tool/397

 Practical Criteria for a Refactoring Tool/399

 Wrap Up/401

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

References/407

List of Soundbites/411

Index/413

随便看

 

霍普软件下载网电子书栏目提供海量电子书在线免费阅读及下载。

 

Copyright © 2002-2024 101bt.net All Rights Reserved
更新时间:2025/3/1 9:19:43