注册 | 登录读书好,好读书,读好书!
读书网-DuShu.com
当前位置: 首页出版图书科学技术计算机/网络软件与程序设计程序设计综合重构手册(影印版)

重构手册(影印版)

重构手册(影印版)

定 价:¥29.80

作 者: (美)Willian C.Wake著
出版社: 中国电力出版社
丛编项: 原版风暴系列
标 签: 计算机/网络 影印版

ISBN: 9787508322087 出版时间: 2004-06-01 包装: 平装
开本: 23cm 页数: 224 字数:  

内容简介

  利用这本通过示例“说话”的实例手册,可以充分发挥重构的强大功能,改善现有的软件。Wake采用了实例手册的方法来组织全书,以帮助了解最为重要的重构技术并将其应用于代码之中。这是一种强调学习的方法,要求你必须充分应用本书所提供的诸多技术。除此之外,这种方法还有一个附带的好处,即尽管你当前所做的工作也许并非重构,利用此实例手册也将有助于使你更多地考虑如何创建优质的代码。对于许多人来说,学习重构的最大障碍是如何找出代码的“坏味道(smell)”,即可能存在问题之处。本书并非让你流水帐式地通读这些坏味道,而是确保你对这些坏味道有切实的理解。在此奉上了一系列精心组织的问题,通过这些问题的解决,你将会茅塞顿开,不仅会在更深层次上了解重构,而且还将获得你自己的一些心得体会。Wake采用了实例手册的方式来组织全书,以帮助你了解最为重要的重构技术并将其应用于代码之中。这是一种强调学习的方法,要求你必须充分应用本书所提供的诸多技术。除此之外,这种方法还有一个附带的好处,即尽管当前你所作的工作也许并非重构,利用本书也将有助于你更多地考虑如何创建优质的代码。本书提供了一下优秀特性,可令读者轻松上手:*方便的“坏味道”速查手册(嗅探工具)*描述“坏味道”的标准格式*介绍关键重构技术的附录*支持重构的Java工具列表本书面向有Java经验的程序员,不过C#或C++程序员对Java有基本的了解,也能顺利地阅读本书并学习书中的示例。本书可以作为MartinFowler所著《重构――改善既有代码的设计》(中文版和影印版均已由中国电力出版社出版)一书的姊妹篇,该书对多种重构技术提供了循序渐进的介绍。WillianC.Wake是以为独立软件顾问、教员和培训师。他致力于程序设计已逾20年,曾任职于CapitalOneFinancial、MCI/WorldCom和VTLS等世界知名大公司。他还是《ExtremeProgrammingExplored》一书的作者。

作者简介

  WillianC.Wake是一位独立软件顾问、教员和培训师。他致力于程序设计已逾20年,曾任职于CapitalOneFinancial、MCI/WorldCom和VTLS等世界知名大公司。他还是《ExtremeProgrammingExplored》一书的作者。

图书目录

Preface. 
1. Roadmap. 
Overview. Section 1: Smells within Classes. Section 2: Smells between Classes. Section 3: Programs to Refactor. A Word on the Challenges. 
I. SMELLS WITHIN CLASSES. 
2. The Refactoring Cycle. 
What Is Refactoring? Smells Are Problems. The Refactoring Cycle. When Are We Done? Inside a Refactoring. Challenges. Conclusion. 
3. Measured Smells. 
Smells Covered. Comments. Long Method. Large Class. Long Parameter List. More Challenges. Conclusion. 
Interlude 1. Smells and Refactorings. 
4. Names. 
Smells Covered. Type Embedded in Name (Including Hungarian). Uncommunicative Name. Inconsistent Names. 
5. Unnecessary Complexity. 
Smells Covered. Dead Code. Speculative Generality. 
Interlude 2. Inverses. 
6. Duplication. 
Smells Covered. Magic Number. Duplicated Code. Alternative Classes with Different Interfaces. Challenges. 
7. Conditional Logic. 
Smells Covered. Null Check. Complicated Boolean Expression. Special Case. Simulated Inheritance (Switch Statement). 
Interlude 3. Design Patterns. 
II. SMELLS BETWEEN CLASSES. 
8. Data. 
Smells Covered. Primitive Obsession. Data Class. Data Clump. Temporary Field. 
9. Inheritance. 
Smells Covered. Refused Bequest. Inappropriate Intimacy (Subclass Form). Lazy Class. 
10. Responsibility. 
Smells Covered. Feature Envy. Inappropriate Intimacy (General Form). Message Chains. Middle Man. Challenges. 
11. Accommodating Change. 
Smells Covered. Divergent Change. Shotgun Surgery. Parallel Inheritance Hierarchies. Combinatorial Explosion. 
12. Library Classes. 
Smells Covered. Incomplete Library Class. Challenges. 
Interlude 4. Gen-A-Refactoring. 
III. PROGRAMS TO REFACTOR. 
13. A Database Example. 
Course.java (Online at www.xp123.com/rwb). Offering.java. Schedule.java. Report.java. TestSchedule.java. TestReport.java. 
14. A Simple Game. 
Development Episodes. 
15. Catalog. 
Introduction. Path 1: Catalog.itemsMatching(query). Path 2: Query.matchesIn(catalog). Path 3: Process(catalog.data, query.data). Conclusion. 
16. Planning Game Simulator. 
Part 1: Original Code. Part 2: Redistributing Features. Removing Duplication, Selection Troubles, and a Few Burrs. Part 3: Pushing the Code Further. 
17. Where to Go from Here. 
Books. Admonitions. Exercises to Try. Web Sites. 
IV. APPENDIXES. 
A: Answers to Selected Questions. 
B: Java Refactoring Tools. 
C: Inverses for Refactorings. 
D: Key Refactorings. 
Bibliography. 
Index.

本目录推荐