注冊 | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當前位置: 首頁出版圖書科學技術計算機/網(wǎng)絡軟件工程及軟件方法學重構(gòu):改善既有代碼的設計(評注版)

重構(gòu):改善既有代碼的設計(評注版)

重構(gòu):改善既有代碼的設計(評注版)

定 價:¥69.00

作 者: Martin Fowler,Kent Beck,John Brant,William Opdyke,Don Roberts(馬丁.福勒,肯特.貝克,約翰.布蘭特,威廉.奧迪克,唐.羅伯茨) 編著
出版社: 電子工業(yè)出版社
叢編項:
標 簽: 軟件工程/開發(fā)項目管理

ISBN: 9787121134500 出版時間: 2011-06-01 包裝: 平裝
開本: 16開 頁數(shù): 452 字數(shù):  

內(nèi)容簡介

  重構(gòu),一言以蔽之,就是在不改變外部行為的前提下,有條不紊地改善代碼。多年前,正是本書原版的出版,使重構(gòu)終于從編程高手們的小圈子走出,成為眾多普通程序員日常開發(fā)工作中不可或缺的一部分?!吨貥?gòu):改善既有代碼的設計(評注版)》也因此成為與《設計模式》齊名的經(jīng)典著作,被譯為中、德、俄、日等眾多語言,在世界范圍內(nèi)暢銷不衰。Martin Fowler等著的《重構(gòu):改善既有代碼的設計(評注版)》凝聚了軟件開發(fā)社區(qū)專家多年摸索而獲得的寶貴經(jīng)驗,擁有不因時光流逝而磨滅的價值。今天,無論是重構(gòu)本身,業(yè)界對重構(gòu)的理解,還是開發(fā)工具對重構(gòu)的支持力度,都與本書最初出版時不可同日而語,但書中所蘊涵的意味和精華,依然值得反復咀嚼,而且往往能夠常讀常新。《重構(gòu):改善既有代碼的設計(評注版)》力邀國內(nèi)資深專家執(zhí)筆,在英文原著基礎上增加中文點評與注釋,旨在以先行者的學研心得與實踐感悟,對讀者閱讀與學習加以點撥、指明捷徑。

作者簡介

  Martin Fowler世界級軟件開發(fā)大師,在面向?qū)ο蠓治鲈O計、UML、模式、XP和重構(gòu)等領域都有卓越貢獻,曾任著名軟件開發(fā)咨詢公司ThoughtWorks的首席科學家。他的多部著作《分析模式》、《UML精悴》和《企業(yè)應用架構(gòu)模式》等都已經(jīng)成為膾炙人口的經(jīng)典。

圖書目錄

Chapter 1  Refactoring, a FirstExample(新增批注共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 withPolymorphism 30
Final Thoughts 41
Chapter 2  Principles in Refactoring(新增批注共11條) 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 MartinFowler)
(新增批注共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(新增批注共9條) 109
Extract Method 110
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
(新增批注共12條) 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 234
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 CallsSimpler(新增批注共14條) 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 withGeneralization(新增批注共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 MartinFowler)
(新增批注共11條) 349
Tease Apart Inheritance 351
Convert Procedural Design to Objects 358
Separate Domain from Presentation 363
Extract Hierarchy 367
Chapter 13  Refactoring, Reuse, and Reality (by WilliamOpdyke)
(新增批注共8條) 373
A Reality Check 374
Why Are Developers Reluctant to Refactor TheirPrograms? 375
A Reality Check (Revisited) 388
Resources and References for Refactoring 389
Implications Regarding Software Reuse and TechnologyTransfer 390
A Final Note 391
References 391
Chapter 14  Refactoring Tools (by Don Roberts and JohnBrant) 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 ? 讀書網(wǎng) ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號 鄂公網(wǎng)安備 42010302001612號