注冊(cè) | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當(dāng)前位置: 首頁出版圖書科學(xué)技術(shù)計(jì)算機(jī)/網(wǎng)絡(luò)軟件與程序設(shè)計(jì)程序設(shè)計(jì)綜合重構(gòu):改善既有代碼的設(shè)計(jì)

重構(gòu):改善既有代碼的設(shè)計(jì)

重構(gòu):改善既有代碼的設(shè)計(jì)

定 價(jià):¥49.00

作 者: (美)Martin Fowler著
出版社: 中國電力出版社
叢編項(xiàng): 原版風(fēng)暴·軟件工程系列
標(biāo) 簽: 計(jì)算機(jī)/網(wǎng)絡(luò) 軟件工程/開發(fā)項(xiàng)目管理

ISBN: 9787508315010 出版時(shí)間: 2003-06-01 包裝: 平裝
開本: 23cm 頁數(shù): 431 字?jǐn)?shù):  

內(nèi)容簡介

  隨著對(duì)象技術(shù)應(yīng)用越來越普及,軟件開發(fā)社區(qū)出現(xiàn)了一個(gè)新的問題。缺乏經(jīng)驗(yàn)的開發(fā)者編寫出了大批設(shè)計(jì)較差的程序,導(dǎo)致這些應(yīng)用程序非常低效,且難于維護(hù)和擴(kuò)展。本書除了討論重構(gòu)的各種技巧之外,還提供了超過70個(gè)可行重構(gòu)的詳細(xì)編目,對(duì)如何應(yīng)用它們給出了有用的提示;并以stepbystep的形式給出了應(yīng)用每一種重構(gòu)的指南;而且用實(shí)例展示了重構(gòu)的工作原理。這些示例都是用Java語言寫成的,但其中的思想?yún)s可以運(yùn)用于任何面向?qū)ο缶幊陶Z言。本書是軟件工程領(lǐng)域的超級(jí)經(jīng)典巨著,與另一巨著《設(shè)計(jì)模式》并稱"軟工雙雄",全美銷量超過100000冊(cè),亞馬遜書店五星書。在本書中,作者M(jìn)artinFowler充分展示了何處可能需要重構(gòu),以及如何將不好的設(shè)計(jì)改造為良好的設(shè)計(jì)。重構(gòu)的每一步可能都非常簡單、非?;A(chǔ),但這些輕微的改變的累積效果卻可以在極大程度上改進(jìn)我們的設(shè)計(jì)。事實(shí)證明,重構(gòu)是防止軟件沒落的可行方式。本書除了討論重構(gòu)的各種技巧之外,還提供了超過70個(gè)可行重構(gòu)的詳細(xì)目錄,給出了重構(gòu)的工作原理,并以stepbystep的形式給出了應(yīng)用每一種重構(gòu)的指南。這些示例都是用Java語言寫成的,但其中的思想?yún)s可以運(yùn)用到任何面對(duì)象的編程語言中。第一作者M(jìn)artinFowler,除了是對(duì)象技術(shù)方面的專家外,還是UML和模式方面的專家。他撰寫的AnalysisPatterns、UMLDistilled、PatternsofEnterpriseApplicationArchitecture和PlanningExtremeProgramming幾本書也廣受贊譽(yù),在亞馬遜上的評(píng)價(jià)也極高(最低星級(jí)為4星),從這些也足可見其在業(yè)內(nèi)的顯赫地位。相信這本書以影印版的形式在國內(nèi)推出,巨匠巨著,原汁原味,無疑是給國內(nèi)廣大軟件開發(fā)人員提供了一盞前進(jìn)路上的明燈。讀者對(duì)象:軟件開發(fā)人員,項(xiàng)目管理人員,高等院校計(jì)算機(jī)及相關(guān)專業(yè)師生,其他相關(guān)人員

作者簡介

  作者:MartinFowlerMartinFowler是一位獨(dú)立咨詢顧問,他運(yùn)用對(duì)象技術(shù)解決企業(yè)問題已經(jīng)超過十年。他的顧問領(lǐng)域包括健康管理、金融貿(mào)易,以及法人財(cái)務(wù)。他的客戶包括Chrysler,Citibank,UKNationalHealthService,AndersenConsulting,NetscapeCommunications。此外Fowler也是objects、UML、patterns技術(shù)的一位合格講師,他是《AnalysisPatterns》和《UMLDistilled》的作者。UML精粹:標(biāo)準(zhǔn)對(duì)象建模語言簡明指南(第3版)(英文影印版)>>更多作品

圖書目錄

1. Refactoring, a First Example. 
The Starting Point. 
The First Step in Refactoring. 
Decomposing and Redistributing the Statement Method. 
Replacing the Conditional Logic on Price Code with Polymorphism. 
Final Thoughts. 

2. Principles in Refactoring. 
Defining Refactoring. 
Why Should You Refactor? 
When Should You Refactor? 
What Do I Tell My Manager? 
Problems with Refactoring. 
Refactoring and Design. 
Refactoring and Performance. 
Where Did Refactoring Come From? 

3. Bad Smells in Code. 
Duplicated Code. 
Long Method. 
Large Class. 
Long Parameter List. 
Divergent Change. 
Shotgun Surgery. 
Feature Envy. 
Data Clumps. 
Primitive Obsession. 
Switch Statements. 
Parallel Inheritance Hierarchies. 
Lazy Class. 
Speculative Generality. 
Temporary Field. 
Message Chains. 
Middle Man. 
Inappropriate Intimacy. 
Alternative Classes with Different Interfaces. 
Incomplete Library Class. 
Data Class. 
Refused Bequest. 
Comments. 

4. Building Tests. 
The Value of Self-testing Code. 
The JUnit Testing Framework. 
Adding More Tests. 

5. Toward a Catalog of Refactorings. 
Format of the Refactorings. 
Finding References. 
How Mature Are These Refactorings? 

6. Composing Methods. 
Extract Method. 
Inline Method. 
Inline Temp. 
Replace Temp with Query. 
Introduce Explaining Variable. 
Split Temporary Variable. 
Remove Assignments to Parameters. 
Replace Method with Method Object. 
Substitute Algorithm. 

7. Moving Features Between Objects. 
Move Method. 
Move Field. 
Extract Class. 
Inline Class. 
Hide Delegate. 
Remove Middle Man. 
Introduce Foreign Method. 
Introduce Local Extension. 

8. Organizing Data. 
Self Encapsulate Field. 
Replace Data Value with Object. 
Change Value to Reference. 
Change Reference to Value. 
Replace Array with Object. 
Duplicate Observed Data. 
Change Unidirectional Association to Bidirectional. 
Change Bidirectional Association to Unidirectional. 
Replace Magic Number with Symbolic Constant. 
Encapsulate Field. 
Encapsulate Collection. 
Replace Record with Data Class. 
Replace Type Code with Class. 
Replace Type Code with Subclasses. 
Replace Type Code with State/Strategy. 
Replace Subclass with Fields. 

9. Simplifying Conditional Expressions. 
Decompose Conditional. 
Consolidate Conditional Expression. 
Consolidate Duplicate Conditional Fragments. 
Remove Control Flag. 
Replace Nested Conditional with Guard Clauses. 
Replace Conditional with Polymorphism. 
Introduce Null Object. 
Introduce Assertion. 

10. Making Method Calls Simpler. 
Rename Method. 
Add Parameter. 
Remove Parameter. 
Separate Query from Modifier. 
Parameterize Method. 
Replace Parameter with Explicit Methods. 
Preserve Whole Object. 
Replace Parameter with Method. 
Introduce Parameter Object. 
Remove Setting Method. 
Hide Method. 
Replace Constructor with Factory Method. 
Encapsulate Downcast. 
Replace Error Code with Exception. 
Replace Exception with Test. 

11. Dealing with Generalization. 
Pull Up Field. 
Pull Up Method. 
Pull Up Constructor Body. 
Push Down Method. 
Push Down Field. 
Extract Subclass. 
Extract Superclass. 
Extract Interface. 
Collapse Hierarchy. 
Form Template Method. 
Replace Inheritance with Delegation. 
Replace Delegation with Inheritance. 

12. Big Refactorings. 
Tease Apart Inheritance. 
Convert Procedural Design to Objects. 
Separate Domain from Presentation. 
Extract Hierarchy. 

13. Refactoring, Reuse, and Reality. 
A Reality Check. 
Why Are Developers Reluctant to Refactor Their Programs? 
A Reality Check (Revisited). 
Resources and References for Refactoring. 
Implications Regarding Software Reuse and Technology Transfer. 
A Final Note. 
References. 

14. Refactoring Tools. 
Refactoring with a Tool. 
Technical Criteria for a Refactoring Tool. 
Practical Criteria for a Refactoring Tool. 
Wrap Up. 

15. Putting It All Together. 
References. 
List of Soundbites. 
List of Refactorings. 

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) hotzeplotz.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號(hào) 鄂公網(wǎng)安備 42010302001612號(hào)