重构:改善既有代码的设计

重构:改善既有代码的设计
分享
扫描下方二维码分享到微信
打开微信,点击右上角”+“,
使用”扫一扫“即可将网页分享到朋友圈。
作者: [美]
2011-06
版次: 1
ISBN: 9787121134500
定价: 69.00
装帧: 平装
开本: 16开
纸张: 胶版纸
页数: 425页
原版书名: Refactoring: Improving the Design of Existing Code
14人买过
  •   重构,一言以蔽之,就是在不改变外部行为的前提下,有条不紊地改善代码。多年前,正是本书原版的出版,使重构终于从编程高手们的小圈子走出,成为众多普通程序员日常开发工作中不可或缺的一部分。《重构:改善既有代码的设计(评注版)》也因此成为与《设计模式》齐名的经典著作,被译为中、德、俄、日等众多语言,在世界范围内畅销不衰。

      Martin Fowler等著的《重构:改善既有代码的设计(评注版)》凝聚了软件开发社区专家多年摸索而获得的宝贵经验,拥有不因时光流逝而磨灭的价值。今天,无论是重构本身,业界对重构的理解,还是开发工具对重构的支持力度,都与本书最初出版时不可同日而语,但书中所蕴涵的意味和精华,依然值得反复咀嚼,而且往往能够常读常新。

      《重构:改善既有代码的设计(评注版)》力邀国内资深专家执笔,在英文原著基础上增加中文点评与注释,旨在以先行者的学研心得与实践感悟,对读者阅读与学习加以点拨、指明捷径。
      Martin Fowler世界级软件开发大师,在面向对象分析设计、UML、模式、XP和重构等领域都有卓越贡献,曾任著名软件开发咨询公司ThoughtWorks的首席科学家。他的多部著作《分析模式》、《UML精悴》和《企业应用架构模式》等都已经成为脍炙人口的经典。
    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等著的《重构:改善既有代码的设计(评注版)》凝聚了软件开发社区专家多年摸索而获得的宝贵经验,拥有不因时光流逝而磨灭的价值。今天,无论是重构本身,业界对重构的理解,还是开发工具对重构的支持力度,都与本书最初出版时不可同日而语,但书中所蕴涵的意味和精华,依然值得反复咀嚼,而且往往能够常读常新。

      《重构:改善既有代码的设计(评注版)》力邀国内资深专家执笔,在英文原著基础上增加中文点评与注释,旨在以先行者的学研心得与实践感悟,对读者阅读与学习加以点拨、指明捷径。
  • 作者简介:
      Martin Fowler世界级软件开发大师,在面向对象分析设计、UML、模式、XP和重构等领域都有卓越贡献,曾任著名软件开发咨询公司ThoughtWorks的首席科学家。他的多部著作《分析模式》、《UML精悴》和《企业应用架构模式》等都已经成为脍炙人口的经典。
  • 目录:
    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


查看详情
系列丛书 / 更多
重构:改善既有代码的设计
程序员修炼之道:从小工到专家
[美]亨特(Andrew Hunt)、[美]托马斯(Daid Thomas) 著;马维达 译
重构:改善既有代码的设计
Essential C++中文版
[美]Stanley B.Lippman 著;侯捷 译
重构:改善既有代码的设计
More Effective C++(中文版):35个改善编程与设计的有效方法
[美]Scott Meyers 著;侯捷 译
重构:改善既有代码的设计
Effective C++ 改善程序与设计的55个具体做法(第3版)
[美]梅耶(Scott Meyers) 著;侯捷 译
重构:改善既有代码的设计
UNIX编程艺术
[美]Eric S.Raymond 著;姜宏、何源、蔡晓骏 译
重构:改善既有代码的设计
传世经典书丛·Effective STL中文版:50条有效使用STL的经验(双色)
[美]Scott Meyers 著;潘爱民、陈铭、邹开红 译
重构:改善既有代码的设计
More Exceptional C++(中文版)
[美]舒特(Sutter H.) 著;於春景 译
重构:改善既有代码的设计
程序员修炼之道:从小工到专家
安德鲁·亨特(Andrew Hunt)、大卫·托马斯(David Thomas) 著;周爱民 译
重构:改善既有代码的设计
提高C++性能的编程技术
[美]布尔卡、梅休 著;左飞 译
重构:改善既有代码的设计
Java编程思想(第4版)(评注版)
[美]Bruce Eckel 著
重构:改善既有代码的设计
Effective C++:改善程序与设计的55个具体做法
[美]Scott meyers 著;云飞 注
重构:改善既有代码的设计
编程匠艺:编写卓越的代码
Pete Goodliffe 著;韩江、陈玉 译
您可能感兴趣 / 更多
重构:改善既有代码的设计
孩子,把你的手给我1:怎么说孩子才爱听,怎么教孩子才肯学?帮助每一位3-12岁孩子的父母结束与孩子的所有冲突!
[美]海姆·G.吉诺特
重构:改善既有代码的设计
怎样做成大事
[美]丹·加德纳(Dan Gardner) 著;贾拥民 译;湛庐文化 出品;[丹麦]傅以斌(Bent Flyvbjerg)
重构:改善既有代码的设计
1200年希腊罗马神话
[美]伊迪丝·汉密尔顿
重构:改善既有代码的设计
爱情心理学(新编本)
[美]罗伯特·J. 斯腾伯格 (美)凯琳·斯腾伯格 倪爱萍 译
重构:改善既有代码的设计
黄金圈法则
[美]西蒙·斯涅克 著;磨铁文化 出品
重构:改善既有代码的设计
汤姆·索亚历险记 彩图注音版 一二三四年级5-6-7-8-9岁小学生课外阅读经典 儿童文学无障碍有声伴读世界名著童话故事
[美]马克 吐温
重构:改善既有代码的设计
富兰克林自传 名家全译本 改变无数人命运的励志传奇 埃隆马斯克反复推荐 赠富兰克林签名照及精美插图
[美]本杰明·富兰克林 著;李自修 译
重构:改善既有代码的设计
意大利文艺复兴新艺术史
[美]迈克尔·韦恩·科尔 著;[美]斯蒂芬·J·坎贝尔;邵亦杨
重构:改善既有代码的设计
汤姆素亚历险记:中小学生课外阅读快乐读书吧 儿童文学无障碍有声伴读世界名著童话故事
[美]马克·吐温
重构:改善既有代码的设计
老人与海 彩图注音版 一二三四年级5-6-7-8-9岁小学生课外阅读经典 儿童文学无障碍有声伴读世界名著童话故事
[美]海明威
重构:改善既有代码的设计
养育的觉醒:全面激发孩子自驱力,教你如何心平气和做妈妈
[美]凯文·莱曼 著;唐晓璐 译;斯坦威 出品
重构:改善既有代码的设计
国际大奖图画书系列 共11册(小老鼠的恐惧的大书,大灰狼,红豆与菲比,别烦我,下雪了 ,穿靴子的猫 ,先有蛋,绿 ,特别快递,如果你想看鲸鱼 ,一个部落的孩子 ) 麦克米伦世纪
[美]莱恩·史密斯 (英)埃米莉·格雷维特 (美)劳拉·瓦卡罗·等/文 (英)埃米莉·格雷维特 等/图 彭懿 杨玲玲 阿甲 孙慧阳 白薇 译