重構

重構 pdf epub mobi txt 電子書 下載2025

出版者:人民郵電齣版社
作者:[美] Martin Fowler
出品人:
頁數:452
译者:
出版時間:2010-11
價格:69.00元
裝幀:平裝
isbn號碼:9787115239143
叢書系列:圖靈程序設計叢書·程序員修煉係列
圖書標籤:
  • 重構
  • 軟件設計
  • 軟件開發
  • 軟件工程
  • 編程
  • 計算機科學
  • programming
  • IT
  • 重構
  • 代碼質量
  • 軟件設計
  • 編程實踐
  • 代碼改進
  • 可維護性
  • 設計模式
  • 軟件工程
  • 代碼整潔
  • 技術書籍
想要找書就要到 小美書屋
立刻按 ctrl+D收藏本頁
你會得到大驚喜!!

具體描述

重構,一言以蔽之,就是在不改變外部行為的前提下,有條不紊地改善代碼。多年前,正是本書原版的齣版,使重構終於從編程高手們的小圈子走齣,成為眾多普通程序員日常開發工作中不可或缺的一部分。本書也因此成為與《設計模式》齊名的經典著作,被譯為中、德、俄、日等眾多語言,在世界範圍內暢銷不衰。

本書凝聚瞭軟件開發社區專傢多年摸索而獲得的寶貴經驗,擁有不因時光流逝而磨滅的價值。今天,無論是重構本身,業界對重構的理解,還是開發工具對重構的支持力度,都與本書最初齣版時不可同日而語,但書中所蘊涵的意味和精華,依然值得反復咀嚼,而且往往能夠常讀常新。

著者簡介

Martin Fowler 世界軟件開發大師,在麵嚮對象分析設計、UML、模式、XP和重構等領域都有卓越貢獻,現為著名軟件開發谘詢公司ThoughtWorks的首席科學傢。他的多部著作《分析模式》、《UML精粹》和《企業應用架構模式》等都已經成為膾炙人口的經典。

其他參編者

Kent Beck 軟件開發方法學的泰鬥,極限編程的創始人。他是Three Rivers Institute公司總裁,也是Agitar Software的成員。

John Brant和Don Roberts The Refactory公司的創始人,Refactoring Browser http://st-www.cs.illinois.edu/users/brant/Refactory/)的開發者,多年來一直從事研究重構的實踐與理論。

William Opdyke 目前在朗訊貝爾實驗室工作,他寫的關於麵嚮對象框架的博士論文是重構方麵的第一篇著名文章。

圖書目錄

Chapter 1 Refactoring, a First Example 1
The Starting Point   1
The First Step in Refactoring   7
Decomposing and Redistributing the Statement Method   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 (by Kent 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 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 Class86
Data Class   86
Refused Bequest    87
Comments   87
Chapter 4: Building Tests  89
The Value of Self-testing Code   89
The JUnit Testing Framework   91
Adding More Tests   97
Chapter 5: Toward a Catalog of Refactorings
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   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  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 Generalization319
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  345
Replace Inheritance with Delegation   352
Replace Delegation with Inheritance   355
Chapter 12: Big Refactorings (by Kent 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 Reality (by William Opdyke)   379
A Reality Check     380
Why Are Developers Reluctant to Refactor
Their Programs     381
A Reality Check (Revisited)    394
Resources and References for Refactoring   394
Implications Regarding Software Reuse and Technology Transfer     395
A Final Note397
References                   397
Chapter 14: Refactoring Tools (by Don 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 (by Kent Beck)   409
References    413
List of Soundbites     417
Index  419
· · · · · · (收起)

讀後感

評分

《重构》给我最大的收获,其实是想法而非技巧。 开发人员的完美主义倾向,容易变成他们做Big Design Up Front的驱动力。而在现实的环境中,时间、资源等约束条件,通常不会允许我们进行过于详细的设计。 我认为最好的做法是,轻量级的设计 + 适当的重构,迭代地开发出满足各...  

評分

代码的坏味道章节描述了常见的不良代码,而且基本上流行于各种编程语言。 第6~11章概括了一些java中的重构手法,是作者在实际操作过程中重构笔记的基础上总结而成,对于我们非Java程序员来说选择性阅读即可。 重构手法中包含了不少譬如提炼函数和内联函数这样的相反的操作,这...  

評分

书中说过重构的思想由来已久,只不过没人写成书籍罢了。 个人感觉如果你看完这本书只看到了思想,那你就错过了很多有价值的东西。小步骤的重构,如何最大限度的不引入bug才是书中要告诉大家的。像了解重构思想,只看前几章就够了。我个人认为书中最有价值的东西恰恰是进行重构...  

評分

纸张很赞,只是排版松散,书就比较厚了。 本人对代码有洁癖,不自觉的一直会调整过去的代码,也需要对照大师总结的规律反思一下。 重构的基础能力在于能够嗅出代码中的坏味道(Bad smell),甚至反模式(Anti-pattern),因此要结合相关书籍一起阅读了。 最近在看的肖鹏一篇文...  

評分

纵览武侠江湖,制胜法门不外两项,内功和外功。二者得一可天下去得,但最终皆入内外兼修之境 倚天是自内而外,先修内功九阳真经,然后以此为基础,加上太极拳和太极剑,最终成就天下第一高手 笑傲是自外而内,先学独孤九剑,后学吸星大法,最后学易筋经。 神雕也不外如是,玉女...  

用戶評價

评分

主要是代碼層次的經驗,大牛間逐漸形成的一些無形規範,讀的很快,有時間可以再翻下,迴頭對照自己的代碼。

评分

主要是代碼層次的經驗,大牛間逐漸形成的一些無形規範,讀的很快,有時間可以再翻下,迴頭對照自己的代碼。

评分

主要是代碼層次的經驗,大牛間逐漸形成的一些無形規範,讀的很快,有時間可以再翻下,迴頭對照自己的代碼。

评分

2013-07-20斷斷續續終於看完一遍瞭,後麵就放到桌子上當作參考手冊瞭,需要的時候翻翻//淘寶買的,很久沒買書瞭。紙質的有點臭,在桌子上攤開有段時間瞭,沒氣味瞭。

评分

主要是代碼層次的經驗,大牛間逐漸形成的一些無形規範,讀的很快,有時間可以再翻下,迴頭對照自己的代碼。

本站所有內容均為互聯網搜索引擎提供的公開搜索信息,本站不存儲任何數據與內容,任何內容與數據均與本站無關,如有需要請聯繫相關搜索引擎包括但不限於百度google,bing,sogou

© 2025 book.quotespace.org All Rights Reserved. 小美書屋 版权所有