{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

重构 改善既有代码的设计 英文版

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

重构 改善既有代码的设计 英文版

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

软件开发的不朽经典
生动阐述重构原理和具体做法
普通程序员进阶到编程高手必须修炼的秘笈

重构,一言以蔽之,就是在不改变外部行为的前提下,有条不紊地改善代码。多年前,正是本书原版的出版,使重构终于从编程高手们的小圈子走出,成为众多普通程序员日常开发工作中不可或缺的一部分。本书也因此成为与《设计模式》齐名的经典著作,被译为中、德、俄、日等众多语言,在世界范围内畅销不衰。

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

本书清晰揭示了重构的过程,解释了重构的原理和实践方式,并给出了何时以及何地应该开始挖掘代码以求改善。书中给出了70 多个可行的重构,每个重构都介绍了一种经过验证的代码变换手法的动机和技术。本书提出的重构准则将帮助你一次一小步地修改你的代码,从而减少了开发过程中的风险。
Author Description

Martin Fowler,世界软件开发大师,在面向对象分析设计、UML、模式、XP和重构等领域都有卓越贡献,现为软件开发咨询公司ThoughtWorks的首席科学家。他的多部著作《分析模式》、《UML精粹》和《企业应用架构模式》等都已经成为脍炙人口的经典。
Catalogue

第1章重构,第一个案例 1
1.1起点 1
1.2重构的第一步 7
1.3分解并重组statement() 8
1.4运用多态取代与价格相关的条件逻辑 34
1.5结语 52
第2章重构原则 53
2.1何谓重构 53
2.2为何重构 55
2.3何时重构 57
2.4怎么对经理说 60
2.5重构的难题 62
2.6重构与设计 66
2.7重构与性能 69
2.8重构起源何处 71
第3章代码的坏味道 75
3.1Duplicated Code(重复代码) 76
3.2Long Method(过长函数) 76
3.3Large Class(过大的类) 78
3.4Long Parameter List(过长参数列) 78
3.5Divergent Change(发散式变化) 79
3.6Shotgun Surgery(霰弹式修改) 80
3.7Feature Envy(依恋情结) 80
3.8Data Clumps(数据泥团) 81
3.9Primitive Obsession(基本类型偏执) 81
3.10Switch Statements(switch惊悚现身) 82
3.11Parallel InheritanceHierarchies(平行继承体系) 83
3.12Lazy Class(冗赘类) 83
3.13Speculative Generality(夸夸其谈未来性) 83
3.14Temporary Field(令人迷惑的暂时字段) 84
3.15Message Chains(过度耦合的消息链) 84
3.16Middle Man(中间人) 85
3.17Inappropriate Intimacy(狎昵关系) 85
3.18Alternative Classes with Different Interfaces(异曲同工的类) 85
3.19Incomplete Library Class(不完美的库类) 86
3.20Data Class(纯稚的数据类) 86
3.21Refused Bequest(被拒绝的遗赠) 87
3.22Comments(过多的注释) 87
第4章构筑测试体系 89
4.1自测试代码的价值 89
4.2JUnit测试框架 91
4.3添加更多测试 97
第5章重构列表 103
5.1重构的记录格式 103
5.2寻找引用点 105
5.3这些重构手法有多成熟 106
第6章重新组织函数 109
6.1Extract Method(提炼函数) 110
6.2Inline Method(内联函数) 117
6.3Inline Temp(内联临时变量) 119
6.4Replace Temp with Query(以查询取代临时变量) 120
6.5Introduce Explaining Variable(引入解释性变量) 124
6.6Split Temporary Variable(分解临时变量) 128
6.7Remove Assignments to Parameters(移除对参数的赋值) 131
6.8Replace Method with Method Object(以函数对象取代函数) 135
6.9Substitute Algorithm(替换算法) 139
第7章在对象之间搬移特性 141
7.1Move Method(搬移函数) 142
7.2Move Field(搬移字段) 146
7.3Extract Class(提炼类) 149
7.4Inline Class(将类内联化) 154
7.5Hide Delegate(隐藏“委托关系”) 157
7.6Remove Middle Man(移除中间人) 160
7.7Introduce Foreign Method(引入外加函数) 162
7.8Introduce Local Extension(引入本地扩展) 164
第8章重新组织数据 169
8.1Self Encapsulate Field(自封装字段) 171
8.2Replace Data Value with Object(以对象取代数据值) 175
8.3Change Value to Reference(将值对象改为引用对象) 179
8.4Change Reference to Value(将引用对象改为值对象) 183
8.5Replace Array with Object(以对象取代数组) 186
8.6Duplicate Observed Data(复制“被监视数据”) 189
8.7Change Unidirectional Association to Bidirectional(将单向关联改为双向关联) 197
8.8Change Bidirectional Association to Unidirectional(将双向关联改为单向关联) 200
8.9Replace Magic Number with Symbolic Constant(以字面常量取代魔法数) 204
8.10Encapsulate Field(封装字段) 206
8.11Encapsulate Collection(封装集合) 208
8.12Replace Record with Data Class(以数据类取代记录) 217
8.13Replace Type Code with Class(以类取代类型码) 218
8.14Replace Type Code with Subclasses(以子类取代类型码) 223
8.15Replace Type Code with State/Strategy(以State/Strategy取代类型码) 227
8.16Replace Subclass with Fields(以字段取代子类) 232
第9章简化条件表达式 237
9.1Decompose Conditional(分解条件表达式) 238
9.2Consolidate Conditional Expression(合并条件表达式) 240
9.3Consolidate Duplicate Conditional Fragments(合并重复的条件片段) 243
9.4Remove Control Flag(移除控制标记) 245
9.5Replace Nested Conditional with Guard Clauses(以卫语句取代嵌套条件表达式) 250
9.6Replace Conditional with Polymorphism(以多态取代条件表达式) 255
9.7Introduce Null Object(引入Null对象) 260
9.8Introduce Assertion(引入断言) 267
第10章简化函数调用 271
10.1Rename Method(函数改名) 273
10.2Add Parameter(添加参数) 275
10.3Remove Parameter(移除参数) 277
10.4Separate Query from Modifier(将查询函数和修改函数分离) 279
10.5Parameterize Method(令函数携带参数) 283
10.6Replace Parameter with Explicit Methods(以明确函数取代参数) 285
10.7Preserve Whole Object(保持对象完整) 288
10.8Replace Parameter with Methods(以函数取代参数) 292
10.9Introduce Parameter Object(引入参数对象) 295
10.10Remove Setting Method(移除设值函数) 300
10.11Hide Method(隐藏函数) 303
10.12Replace Constructor with Factory Method(以工厂函数取代构造函数) 304
10.13Encapsulate Downcast(封装向下转型) 308
10.14Replace Error Code with Exception(以异常取代错误码) 310
10.15Replace Exception with Test(以测试取代异常) 315
第11章处理概括关系 319
11.1Pull Up Field(字段上移) 320
11.2Pull Up Method(函数上移) 322
11.3Pull Up Constructor Body(构造函数本体上移) 325
11.4Push Down Method(函数下移) 328
11.5Push Down Field(字段下移) 329
11.6Extract Subclass(提炼子类) 330
11.7Extract Superclass(提炼超类) 336
11.8Extract Interface(提炼接口) 341
11.9Collapse Hierarchy(折叠继承体系) 344
11.10Form Tem Plate Method(塑造模板函数) 345
11.11Replace Inheritance with Delegation(以委托取代继承) 352
11.12Replace Delegation with Inheritance(以继承取代委托) 355
第12章大型重构 359
12.1Tease Apart Inheritance(梳理并分解继承体系) 362
12.2Convert Procedural Design to Objects(将过程化设计转化为对象设计) 368
12.3Separate Domain from Presentation(将领域和表述/显示分离) 370
12.4Extract Hierarchy(提炼继承体系) 375
第13章重构,复用与现实 379
13.1现实的检验 380
13.2为什么开发者不愿意重构他们的程序 381
13.3再论现实的检验 394
13.4重构的资源和参考资料 394
13.5从重构联想到软件复用和技术传播 395
13.6小结 397
13.7参考文献 397
第14章重构工具 401
14.1使用工具进行重构 401
14.2重构工具的技术标准 403
14.3重构工具的实用标准 405
14.4小结 407
第15章总结 409
参考书目 413
要点列表 417
索引 419
Book Abstract

《重构 改善既有代码的设计 英文版》:
Now it was easy to run a test—as easy as compiling.So I started to run tests every time I compiled.Soon I began to notice my productivity had shot upward.1 realized that I wasn't spending so much time debugging.If I added a bug that was caught by a previous test, it would show up as soon as I ran that test.Because the test had worked before, I would know that the bug was in the work I had done since I last tested.Because I ran the tests frequently, only a few minutes had elapsed.I thus knew that the source of the bug was the code I had just written, Because that code was fresh in my mind and was a small amount, the bug was easy to find.Bugs that once had taken an hour or more to find now took a couple of minutes at most.Not just had I built self—testing classes, but by running them frequently I had a powerful bug detector.
As I noticed this I became more aggressive about doing the tests.Instead of waiting for the end of increment, I would add the tests immediately after writing a bit of function.Every day I would add a couple of new features and the tests to test them.These days I hardly ever spend more than a few minutes
debugging.
……

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book