出版社:电子工业出版社
年代:2011
定价:59.0
重构,一言以蔽之,就是在不改变外部行为的前提下,有条不紊地改善代码。多年前,正是本书原版的出版,使重构终于从编程高手们的小圈子走出,成为众多普通程序员日常开发工作中不可或缺的一部分。本书也因此成为与《设计模式》齐名的经典著作,被译为中、德、俄、日等众多语言,在世界范围内畅销不衰。
chapter 1 refactoring, a first example(新增批注共21条)
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
chapter 2 principles in refactoring(新增批注共11条)
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?
chapter 3 bad smells in code (by kent beck and martin fowler)
(新增批注共17条)
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
chapter 4 building tests(新增批注共2条)
the value of self.testing code
the junit testing framework
adding more tests
chapter 5 toward a catalog of refactorings
(新增批注共1条)
format of the refactorings
finding references
how mature are these refactorings?
chapter 6 composing methods(新增批注共9条)
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
chapter 7 moving features between objects
(新增批注共12条)
move method
move field
extract class
inline class
hide delegate
remove middle man
introduce foreign method
introduce local extension
chapter 8 organizing data(新增批注共9条)
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
chapter 9 simplifying conditional expressions
(新增批注共6条)
decompose conditional
consolidate conditional expression
consolidate duplicate conditional fragments
remove contr01 flag
replace nested conditional with guard clauses
replace conditional with polymorphism
introduce null object
introduce assertion
chapter 10 making method calls simpler(新增批注共14条)
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
chapter 11 dealing with generalization(新增批注共6条)
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
chapter 12 big refactorings (by kent beck and martin fowler)
(新增批注共11条)
tease apart inheritance
convert procedural design to objects
separate domain from presentation
extract hierarchy
chapter 13 refactoring, reuse, and reality (by william opdyke)
(新增批注共8条)
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
chapter 14 refactoring tools (by don roberts and john brant)
refactoring with a tool
technical criteria for a refactoring tool
practical criteria for a refactoring tool
wrap up
chapter 15 putting it all together (by kent beck)
(新增批注共2条)
references
list of soundbites
index
重构,一言以蔽之,就是在不改变外部行为的前提下,有条不紊地改善代码。多年前,正是本书原版的出版,使重构终于从编程高手们的小圈子走出,成为众多普通程序员日常开发工作中不可或缺的一部分。《重构:改善既有代码的设计(评注版)》也因此成为与《设计模式》齐名的经典著作,被译为中、德、俄、日等众多语言,在世界范围内畅销不衰。
Martin Fowler等著的《重构:改善既有代码的设计(评注版)》凝聚了软件开发社区专家多年摸索而获得的宝贵经验,拥有不因时光流逝而磨灭的价值。今天,无论是重构本身,业界对重构的理解,还是开发工具对重构的支持力度,都与本书最初出版时不可同日而语,但书中所蕴涵的意味和精华,依然值得反复咀嚼,而且往往能够常读常新。
《重构:改善既有代码的设计(评注版)》力邀国内资深专家执笔,在英文原著基础上增加中文点评与注释,旨在以先行者的学研心得与实践感悟,对读者阅读与学习加以点拨、指明捷径。
MartinFowler和本书另几位作者清楚揭示了重构过程,他们为面向对象软件开发所做的贡献难以衡量。《重构——改善既有代码的设计(评注版)》解释了重构的原理和最佳实践,并指出何时何地你应该开始挖掘你的代码以求改善。本书的核心是一系列完整的重构方法,其中每一项都介绍一种经过实践检验的代码变换手法的动机和技术。某些项目如ExtractMethod和MoveField看起来可能很浅显,但不要掉以轻心,因为理解这类技术正是有条不紊地进行重构的关键。本书所提的这些重构手法将帮助你一次一小步地修改你的代码,这就减少了过程中的风险。很快你就会把这些重构手法和其名称加入自己的开发词典中,并且朗朗上口。
书籍详细信息 | |||
书名 | 重构 : 改善既有代码的设计站内查询相似图书 | ||
丛书名 | 传世经典书丛 | ||
9787121134500 如需购买下载《重构 : 改善既有代码的设计》pdf扫描版电子书或查询更多相关信息,请直接复制isbn,搜索即可全网搜索该ISBN | |||
出版地 | 北京 | 出版单位 | 电子工业出版社 |
版次 | 1版 | 印次 | 1 |
定价(元) | 59.0 | 语种 | 简体中文 |
尺寸 | 23 × 18 | 装帧 | 平装 |
页数 | 452 | 印数 |
重构 : 改善既有代码的设计是电子工业出版社于2011.6出版的中图分类号为 TP311.11 的主题关于 机器代码程序-程序设计 的书籍。
(美) 福勒 (Fowler,M.) , 著
(美) 福勒 (Fowler,M.) , 著
(美) 马丁·福勒 (Martin Fowler) , 著
(美) 福勒等, 著
(美) 马丁·福勒 (Martin Fowler) , 著
(美) 马丁·福勒 (Martin Fowler) , 著
(美) 福勒 (Fowler,M.) , 著
(美) 福勒 (Fowler,M.) , 著
(美) 凯斯宾革 (Kaspersky,K.) , 著