锘??xml version="1.0" encoding="utf-8" standalone="yes"?>BlogJava-鍏朵粬鎶鏈尯http://www.67529968.com/misc涓撴敞浜嶫ava鎶鏈?/description>zh-cnWed, 20 Feb 2019 17:10:37 GMTWed, 20 Feb 2019 17:10:37 GMT60鏁寸悊浜?#37832;杩戠櫨骞寸殑钘忓巻鏁版嵁锛屽仛浜?#28051;?#37711;巻钘忓?#21976;?#29362;皠?#27537;灏忓伐鍏?/title><link>http://www.67529968.com/emu/archive/2019/01/30/433627.html</link><dc:creator>emu</dc:creator><author>emu</author><pubDate>Wed, 30 Jan 2019 05:34:00 GMT</pubDate><guid>http://www.67529968.com/emu/archive/2019/01/30/433627.html</guid><wfw:comment>http://www.67529968.com/emu/comments/433627.html</wfw:comment><comments>http://www.67529968.com/emu/archive/2019/01/30/433627.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/emu/comments/commentRss/433627.html</wfw:commentRss><trackback:ping>http://www.67529968.com/emu/services/trackbacks/433627.html</trackback:ping><description><![CDATA[@import url(http://www.67529968.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 杩囧幓涓?#39582;?#28051;鐩撮兘鍦瘡骞?#38040;忓?#21976;柊骞村墠璁炬硶鎷垮?#29256;柊涓骞寸殑钘忓巻鏁版嵁鏇存柊?#22476;?#22172;宸辩殑<a href="https://github.com/stonelf/zangli">涓涓猤ihub椤?#37929;?/a>閲岄潰锛屼粖骞?#28051;?#26473;?#38040;忓?#21976;柊骞?#38171;屽?#26449;?#25120;?#39041;互寰?#27537;寰?#28598;?#38040;忓巻缃戠?#27411;兘娌?#37832;?#37831;?#37826;版槑骞寸殑鏁版嵁浜?#38171;屾濂藉?#21227;埌浜?#37832;杩?#28051;?#27368;骞寸殑钘忓巻鏁版嵁锛?#38010;?#27996;嗙?#35268;椂闂?#37711;?#38318;兘鏇存柊浜?#26473;涘幓锛?#26916;轰究<span style="caret-color: #444444; color: #444444; font-family: Tahoma, Arial, Helvetica, sans-serif; background-color: #ffffff;">鐢宠浜?#28051;涓?#26473;?#28051;嶉敊?#27537;?#29017;鍚?zangli.pro锛?nbsp;</span>?#24386;?#31479;浜?#28051;涓柊缃戠珯<a href="https://www.zangli.pro">?#27368;骞?#38040;忓巻</a>锛?#37826;?#28186;垮瀹堕殢?#26882;?#29025;璇垨鑰?#37734;嚜宸辩殑浜?#37725;?#28051;?#37929;存帴寮?#37922;?#38040;忓巻鍏巻?#27537;鎹?#32480;楄剼鏈?#37510;?img src ="http://www.67529968.com/emu/aggbug/433627.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/emu/" target="_blank">emu</a> 2019-01-30 13:34 <a href="http://www.67529968.com/emu/archive/2019/01/30/433627.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title> ?#30380;?#32972;鎶鏈?#37714;?#27996;?#38171;氳?#30225;?#30380;?#32972;鎶喘绯荤粺鍗?#28051;?#26946;?#39582;跺彂鏋舵?#21229;殑婕?#26473;?#37724;屽疄璺?/title><link>http://www.67529968.com/jb2011/archive/2019/01/24/433621.html</link><dc:creator>Jack Jiang</dc:creator><author>Jack Jiang</author><pubDate>Thu, 24 Jan 2019 12:27:00 GMT</pubDate><guid>http://www.67529968.com/jb2011/archive/2019/01/24/433621.html</guid><wfw:comment>http://www.67529968.com/jb2011/comments/433621.html</wfw:comment><comments>http://www.67529968.com/jb2011/archive/2019/01/24/433621.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/jb2011/comments/commentRss/433621.html</wfw:commentRss><trackback:ping>http://www.67529968.com/jb2011/services/trackbacks/433621.html</trackback:ping><description><![CDATA[     鎽樿: 鏈?#37826;囧師鏂囧唴瀹?#23534;?#37922;嚜楂?#37721;?#37922;?#37835;舵瀯鍏紬鍙?#38171;屽唴瀹?#37832;?#37825;寸悊鍜屼慨璁?#37510;?銆?#23534;?#29815;澶?#28729;?#28725;?#28051;嬮潰杩?#28051;帓闃熺殑鍦烘櫙搴?#29831;?#38344;炲父鐔熸倝锛?#26473;?#28051;?#37828;皬?#32972;鎵?#37832;?#37814;喘?#27537;鐢?#37812;锋帓闃?#27996;?#27996;掑浘锛屽瀹剁湅?#22476;杩?#27996;涙帓闃熺殑鍏斿瓙?#26882;锛?#29831;?#37828;?#28052;?#37832;夊緢澶?#37922;?#37812;?#37734;?#37722;?#28051;?#26882;闂村?#25117;皬?#32972;鎶喘绯荤粺?#24385;浜?#27996;嗚喘涔拌?#38155;眰銆?#9650; ?#30380;?#32972;鎵?#37832;?#37814;喘?#24083;闃?#28051;?..?#30380;?#32972;鎶喘绯荤粺鍚?#32468;?#37832;嶅姟?#28528;涓?#23480;?#28598;殑鍘?#37716;?#38171;?#28051;嬪?#24807;彲?#20114;鍙?#37828;犲皬?#32972;鎶喘绯荤粺?#28528;涓寸殑?#28763;闂村嘲鍊?#37720;?#37716;?#37510;?#26473;?#23534;犲?#28844;埅鍙栬嚜?#28999;骞寸背绮?#38010;?#28598;?#32457;?#37832;嶅姟鍚?#32468;?#37711;朵腑涓缁凩B锛?#29840;?#26462;藉潎琛眰锛夌殑...  <a href='http://www.67529968.com/jb2011/archive/2019/01/24/433621.html'>闃?#29831;?#37711;?#37826;?/a><img src ="http://www.67529968.com/jb2011/aggbug/433621.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/jb2011/" target="_blank">Jack Jiang</a> 2019-01-24 20:27 <a href="http://www.67529968.com/jb2011/archive/2019/01/24/433621.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>銆婃祴璇曢鍔?#23534;?#24386;銆嬬殑璇?#28052;?#32471;?#29825;?/title><link>http://www.67529968.com/zhuyuanxiang/archive/2019/01/18/433616.html</link><dc:creator>鏈?#26473;?#32520;?/dc:creator><author>鏈?#26473;?#32520;?/author><pubDate>Fri, 18 Jan 2019 15:25:00 GMT</pubDate><guid>http://www.67529968.com/zhuyuanxiang/archive/2019/01/18/433616.html</guid><wfw:comment>http://www.67529968.com/zhuyuanxiang/comments/433616.html</wfw:comment><comments>http://www.67529968.com/zhuyuanxiang/archive/2019/01/18/433616.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/zhuyuanxiang/comments/commentRss/433616.html</wfw:commentRss><trackback:ping>http://www.67529968.com/zhuyuanxiang/services/trackbacks/433616.html</trackback:ping><description><![CDATA[<li><a href="#?#31092;璇曢鍔?#23534;鍙戠殑璇?#28052;?#32471;?#29825;?>銆婃祴璇曢鍔?#23534;?#24386;銆嬬殑璇?#28052;?#32471;?#29825;?/a> <ul> <li><a href="#瀛?#28052;犲?#34425;">瀛?#28052;犲?#34425;锛?/a> <li><a href="#瀛?#28052;?#26473;囩">瀛?#28052;?#26473;囩锛?/a> <li><a href="#瀛?#28052;?#37929;殑">瀛?#28052;?#37929;殑锛?/a> <li><a href="#瀛?#28052;?#37808;熸偀">瀛?#28052;?#37808;熸偀锛?/a> <li><a href="#瀛?#28052;?#28000;爜">瀛?#28052;?#28000;爜锛?/a> </li></ul> <li><a href="#?#31092;璇曢鍔?#23534;鍙戠殑瑙勫垯">?#31092;璇曢鍔?#23534;鍙戠殑瑙勫垯</a> <li><a href="#?#31092;璇曠搴忓紑?#24386;?#25030;鏈熺殑闃舵">?#31092;璇曠搴忓紑?#24386;?#25030;鏈熺殑闃舵</a> <ul></ul></nav></aside> <h2 id="?#31092;璇曢鍔?#23534;鍙戠殑璇?#28052;?#32471;?#29825;?>銆婃祴璇曢鍔?#23534;?#24386;銆嬬殑璇?#28052;?#32471;?#29825;?/h2> <h3 id="瀛?#28052;犲?#34425;">瀛?#28052;犲?#34425;锛?/h3> <p>鐔熸倝銆?#29825;?#29825;?#22959;?#23534;?#37510;嬬殑鍩?#37832;?#22994;傚康锛?#37908;熸倝銆?#38322;?#37835;?#37510;嬬殑鍩?#37832;?#22994;傚康锛?#37908;熸?#22794;熀鏈殑Java璇硶锛?#37908;熸倝Eclipse鍜孞Unit?#27537;?#23047;鐢?#38171;?#37832;?#37929;?#28725;硅緝濂界殑鑻?#29831;?#37737;虹銆?/p> <h3 id="瀛?#28052;?#26473;囩">瀛?#28052;?#26473;囩锛?/h3> <ul> <li>绗?閮?#37714;?#38171;屾墜宸緭鍏?#28729;?#28186;嬬搴?#38171;?#27996;嗚TDD?#27537;鏂规硶鍜?#26473;囩銆?#38322;?#37904;?#37828;悊瑙TDD?#27537;鎬?#29882;?#38171;?#37832;濂界殑?#24714;瑙?#37826;?#23534;忓氨鏄?#38315;?#26473;囧疄璺电殑鏂?#23534;忕悊瑙?#37510;? <li>绗?閮?#37714;?#38171;?#37825;?#28003;犲浣?#37922;Python瀹?#37916;?#28051;涓?#32471;?#37722;坸Unit?#27537;?#31092;璇曟?#21976;灦銆? <li>绗?閮?#37714;?#38171;孴DD?#27537;妯?#23534;?#38171;?#26473;?#27996;涙寮忓睍鐜TDD濡?#28003;?#28051;?#37711;朵粬閲?#29781;佹濇兂锛?#28186;嬪锛?#29825;?#29825;?#22959;?#23534;?#37510;?#38322;?#37835;勭?#22796;瓑锛?#28051;璧?#23480;?#28003;滅殑銆?</li></ul> <h3 id="瀛?#28052;?#37929;殑">瀛?#28052;?#37929;殑锛?/h3> <p>缂?#37712;?#23005;?#32429;殑浠爜銆?/p> <h3 id="瀛?#28052;?#37808;熸偀">瀛?#28052;?#37808;熸偀锛?/h3> <ul> <li>閬撶悊寰?#32480;鍗?#38171;屾搷浣?#28052;?#23536;?#32480;鍗?#38171;屼?#21976;槸鎴戜粛鐒?#37827;犳硶鏄?#27996;嗕綔鑰?#29825;?#28598;?#38322;?#37835;勬搷浣滅殑鎰忓浘锛屽彧鏄?#37808;?#29785;?#28003;?#38000;?#37721;兘鏄?#28000;?#37929;磋?#22794;嚭?#24386;鍐?#37713;轰唬?#29212;锛屽?#23945;?#26473;?#38322;?#37835;勬帹杩涙祴璇?#28000;爜涓?#27996;?#37725;佷唬鐮佷箣闂寸殑瑙?#38000;?#37510;?#38171;堢煡鍏剁劧锛?#28051;嶇煡鍏舵墍?#20114;鐒?#38171;? <li>鍙互鍏?#29882;?#26473;?#32471;?閮?#37714;?#38171;?#27996;嗚xUnit濡?#28003;?#28729;?#37916;?#37733;虹劧閲?#29781;?#38171;屼?#21976;槸涓烘鍙?#37812;?#37711;堝Python灏?#37832;?#37904;?#29882;?#26864;?#27996;? <li>杩?#37721;互璺?#26473;?#32471;?閮?#37714;?#38171;?#26473;欓儴鍒嗛兘鏄?#28003;?#38000;?#28000;?#37804;濇兂涓?#28725;TDD?#27537;鎬荤粨锛屼織璇?#29831;?#37413;?#28051;?#37722;?#27996;?#28051;嶆定璁版?#37413;?#38171;岀?#22798;嚜宸?#37734;?#26916;?#37929;?#28051;?#37722;?#28598;?#27996;?#27996;忓?#23942;潵鍥?#26916;?#37714;?#27996;虹殑缁忛獙锛屾墠?#32048;鐪熸鍏?#26982;?#37722;?#37510;?</li></ul> <h3 id="瀛?#28052;?#28000;爜">瀛?#28052;?#28000;爜锛?/h3> <p>浠爜寰?#32480;鍗?#38171;?#28051;嶉渶瑕?#37712;嶆彁渚?#38171;屽弽鑰?#37832;閲?#29781;佺殑鏄嚜宸?#28051;瀹氳鎵?#23480;?#29882;?#28051;閬?#38171;屽惁鍒?#37827;犳硶棰嗕細浣?#38000;呯殑鎰忓浘銆?#38007;?#28751;?#38171;屾垜鍦?#29854;嗙摚涓婄湅浜嗗嚑涓?#29831;?#29825;?#38171;屽閮?#37714;嗛兘鏄?#37930;嬫噦浜?#38171;?#23052;?#37808;?#29785;?#37510;?/p> <h2 id="?#31092;璇曢鍔?#23534;鍙戠殑瑙勫垯">?#31092;璇曢鍔?#23534;鍙戠殑瑙勫垯</h2> <ol> <li>锛圥4锛?#37828;庣璁?#29825;?#37929;?#37837;?#38171;屽?#23677;?#21228;祴璇?#28000;爜 <ul> <li>娑堥櫎閲?#28598;?#29825;?#29825;?#37719;?#37828;?#23057;堥櫎渚濊禆鍏?#32495;?#38171;堟祴璇?#28000;爜涓?#27996;?#37725;佷唬鐮佷箣闂寸殑渚濊禆鍏?#32495;?#38171;?#38171;? <li>?#31092;璇曢鍔?#23534;?#24386;涓?#37828;?#38315;?#26473;?#28051;?#30380;姝?#28051;?#30380;姝?#37833;?#28729;屾?#24878;殑锛?#38000;?#37828;?#37737;?#37711;?#28051;?#30380;姝?#28051;?#30380;姝?#23534;鍙戣蒋浠剁殑?#20824;鍔?#37510;傚洜涓?#32480;鍗曠殑闂?#26864;?#37721;互璧板揩鐐?#38171;屽?#23942;潅?#27537;闂?#26864;?#28751;?#37721;互璧版參鐐?#37510;?</li></ul> <li>锛圥12锛夊?#23677;杽浜?#37725;佷唬?#29212; <ul> <li>瀹屾?#24878;煡閬撴?#28052;堝仛?#27537;浜?#37725;佷唬?#29212;锛? <li>琛?#37711;?#28051;嶇煡閬撴?#28052;堝仛?#27537;浜?#37725;佷浠爜銆?</li></ul> <li>锛圥14锛夊鎵鹃殣鍚殑寮鍙戠洰鏍?#38171;屽?#23677;?#21228;祴璇?#28000;爜 <ul> <li>鍒?#37922;?#28051;?#29785;硶鍙戠幇浜?#37725;佷唬?#29212;涓殑闂?#26864;?#38171;?涓?#29785;硶锛?#35120;?#28186;嬪瓙涓嶆1涓殑?#26882;鍊欐墠瀹屽?#21226;唬?#29212;銆?#37721;互鍦?#23052;?#37832;?#29825;?#29825;?#37804;?#29882;殑?#26882;鍊?#38171;?#37817;?#28051;?#29785;?#25652;?#37804;?#38000;?#38338;?#26864;?#38171;? <li>鍒?#37922;?#38322;?#37835;勮鍐?#37721;戠幇?#27537;闂?#26864;?</li></ul> <li>锛圥17锛?#38315;?#26473;囧紑鍙戠殑鍔熻兘鏉?#38322;?#37835;勬祴璇?#28000;爜 <li>锛圥33锛?#28051;?#37813;撴柇?#22172;宸?#23480;?#32513;忓湪?#20187;?#27537;宸?#28003;?#38171;屽鏋?#38344;炶鎵撴柇涔?#28051;?#29781;?#37734;柊?#27537;宸?#28003;?#28051;?#38010;?#28598;暱?#27537;?#26882;闂?#38171;?#39582;朵笖涓嶈兘鍐嶆鎵撴柇杩?#28051;柊?#27537;宸?#28003;?#37510;?#38171;?#27996;?#28051;?#26473;?#28051;?#38171;? <li>锛圥34锛夋?#24807;埌?#22172;宸辩殑寮鍙戣妭濂?#37510;?#38171;?#28051;寮濮嬫參涓鐐?#38171;屾參?#21443;鍔犲揩锛屽?#23944;皟鏁村洖?#21443;锛?#37929;村?#29256;?#24807;埌?#22172;宸?#37832;鍚?#38315;傜殑鑺?#28610;?#37808;?#38171;? <li>锛圥42锛夊垹?#27342;涓嶉渶瑕佺殑?#29913;绫?#38171;屼細鍙戠?#29256;祴璇?#28000;爜涓?#28699;?#37734;殑涓嶉渶瑕佺殑?#31092;璇?#28052;?#37721;互鍒犻櫎锛堟?#24807;純涓嶉渶瑕佺殑涓滆锛屼細甯?#37716;?#28003;犲?#25120;?#39041;綘杩橀渶瑕佷粈涔?#38171;? <li></li></ol> <h2 id="?#31092;璇曠搴忓紑?#24386;?#25030;鏈熺殑闃舵">?#31092;璇曠搴忓紑?#24386;?#25030;鏈熺殑闃舵</h2> <ol> <li>鍐?#28051;涓祴璇曠搴?#38171;? <li>璁祴璇曠搴忕紪璇?#38315;?#26473;?#38171;? <li>杩?#29723;屾祴璇曠搴?#38171;屽?#25120;幇涓嶈兘杩?#29723;?#38171;? <li>璁祴璇曠搴忓彲?#20114;杩?#29723;?#38171;? <li>娑堥櫎閲?#28598;?#29825;?#29825;?#38171;屼?#27194;寲璁?#29825;?#32513;撴瀯銆?</li></ol> </li><img src ="http://www.67529968.com/zhuyuanxiang/aggbug/433616.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-18 23:25 <a href="http://www.67529968.com/zhuyuanxiang/archive/2019/01/18/433616.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>璇?#29785;?#38346;?#26864;戠紪瑙爜?#27537;鍘熺悊銆?#23125;?#26473;?#37724;屽簲鐢?#38315;夊?#23340;瓑http://www.67529968.com/jb2011/archive/2019/01/18/433615.htmlJack JiangJack JiangFri, 18 Jan 2019 14:02:00 GMThttp://www.67529968.com/jb2011/archive/2019/01/18/433615.htmlhttp://www.67529968.com/jb2011/comments/433615.htmlhttp://www.67529968.com/jb2011/archive/2019/01/18/433615.html#Feedback0http://www.67529968.com/jb2011/comments/commentRss/433615.htmlhttp://www.67529968.com/jb2011/services/trackbacks/433615.html闃?#29831;?#37711;?#37826;?/a>

]]>
銆?#37719;?#37711;冩祴璇?#28052;?#38316;揓ava鐗?#37510;嬬殑璇?#28052;?#32471;?#29825;?/title><link>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433606.html</link><dc:creator>鏈?#26473;?#32520;?/dc:creator><author>鏈?#26473;?#32520;?/author><pubDate>Wed, 16 Jan 2019 09:57:00 GMT</pubDate><guid>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433606.html</guid><wfw:comment>http://www.67529968.com/zhuyuanxiang/comments/433606.html</wfw:comment><comments>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433606.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/zhuyuanxiang/comments/commentRss/433606.html</wfw:commentRss><trackback:ping>http://www.67529968.com/zhuyuanxiang/services/trackbacks/433606.html</trackback:ping><description><![CDATA[<li><a href="#鎬?#29785;?>鎬?#29785;?/a> <li><a href="#绗?绔?棣?#28051;?#37719;?#37711;冩祴璇?>绗?绔?棣?#28051;?#37719;?#37711;冩祴璇?/a> <li><a href="#绗?绔??#23047;鐢junit缂?#37712;欐祴璇?>绗?绔??#23047;鐢JUnit缂?#37712;欐祴璇?/a> <ul> <li><a href="#31-鏋勫缓鍗?#37711;冩祴璇?>3.1 鏋勫缓鍗?#37711;冩祴璇?/a> <li><a href="#32-junit?#27537;鍚勭鏂?#29815;">3.2 JUnit?#27537;鍚勭鏂?#29815;</a> <li><a href="#33-junit妗嗘灦">3.3 JUnit妗嗘灦</a> </li></ul> <li><a href="#4-?#31092;璇?#28000;涔?>4. ?#31092;璇?#28000;涔?#38171;?/a> <li><a href="#5correct姝?#32429;殑杈圭?#23678;潯浠?>5.CORRECT锛?#23005;?#32429;殑锛夎?#22317;?#23678;潯浠?/a> <li><a href="#6?#23047;鐢mock瀵硅薄">6.?#23047;鐢Mock瀵硅薄</a> <li><a href="#7-濂界殑?#31092;璇?#37813;鍏?#37832;夌殑鍝?#29840;a-trip">7. 濂界殑?#31092;璇?#37813;鍏?#37832;夌殑鍝?#29840;?A-TRIP)</a> <li><a href="#8-鍦?#26916;?#37929;?#28051;?#26473;?#29723;屾祴璇?>8. 鍦?#26916;?#37929;?#28051;?#26473;?#29723;屾祴璇?/a> <li><a href="#9-璁?#29825;?#29831;?#26864;?>9. 璁?#29825;?#29831;?#26864;?/a> <ul></ul></nav></aside> <h2 id="鎬?#29785;?>鎬?#29785;?/h2> <p>杩?#37828;?#37832;?#37929;?#28725;圭畝鍗曠殑涔?#38171;屼功涓?#38322;?#37922;殑JUnit?#27537;鐗?#37832;?#28052;?#37828;?#37827;殑锛屼?#21976;槸鍦柊?#27537;JUnit4涓嬬?#23941;仛淇?#37824;?#28186;?#37906;?#37721;互杩?#29723;?#37510;?#38322;?#29781;佺殑鏄?#38315;?#26473;?#26473;?#37832;?#28052;?#27996;嗚JUnit鍦Java?#27537;鍗?#37711;冩祴璇?#28051;?#37828;?#28641;?#28003;曚娇鐢殑銆?/p> <h2 id="绗?绔?棣?#28051;?#37719;?#37711;冩祴璇?>绗?绔?棣?#28051;?#37719;?#37711;冩祴璇?/h2> <p>璁?#37714;?#28003;犵殑?#31092;璇?#38171;氭祴璇?#28051;?#37828;?#37827;?#28051;?#37922;?#37832;夌殑锛屼篃涓?#37828;?#37808;忔兂澶?#23534;?#27537;銆?#37828;?#37837;规嵁?#28214;瑕?#28051;鐐圭?#35268;坊鍔犵殑锛屽府鍔嚜宸?#28751;?#37827;?#37734;?#37721;戠?#29256;?#38000;?#28051;婄殑璇尯銆?#37721;傜湅杩?#32468;?#32513;?#37713;虹殑渚嬪瓙锛屽?#29112;潵?#24714;鎵褰撶?#33333;纭殑锛?#32513;撴灉涓?#28051;瀹?#37828;?#23005;?#32429;殑銆?/p> <h2 id="绗?绔??#23047;鐢junit缂?#37712;欐祴璇?>绗?绔??#23047;鐢JUnit缂?#37712;欐祴璇?/h2> <h3 id="31-鏋勫缓鍗?#37711;冩祴璇?>3.1 鏋勫缓鍗?#37711;冩祴璇?/h3> <p>?#31092;璇?#28000;?#37934;佸繀椤?#29781;佸仛?#27537;鍑?#28000;朵?#23339;儏锛?/p> <ul> <li>鍑?#28598;囨祴璇曠殑鏉?#28000;?#38171;?#37714;涘缓瀵硅薄銆?#37714;嗛厤璧勬簮绛夌瓑锛? <li>璋?#37922;祴璇曠殑鏂规硶 <li>?#29529;璇佹祴璇?#37826;规硶?#27537;琛?#28051;?#28051;?#37832;?#37832;?#37828;?#37722;?#37929;?#32471;? <li>?#31092;璇曠?#25780;潫鍚庢?#21615;悊鐜?#37734;?#38171;?#38322;婃?#25424;?#21228;簮绛夌瓑锛? <h3 id="32-junit?#27537;鍚勭鏂?#29815;">3.2 JUnit?#27537;鍚勭鏂?#29815;</h3> <p>鏂?#29815;锛欽Unit?#24385;渚涚殑杈呭姪鍑?#37825;?#38171;屽府鍔?#28003;?#32429;?#29825;?#29722;祴璇曞嚱鏁版槸鍚?#23005;?#32429;?#26473;?#29723;?#37510;?/p></li></ul> <p>鍚庨潰杩?#28000;?#32513;?#27996;?#38171;?.5 JUnit?#27537;?#22172;瀹?#28052;?#37826;?#29815;锛?/p> <h3 id="33-junit妗嗘灦">3.3 JUnit妗嗘灦</h3> <p>杩?#32468;?#37828;?#37737;?#27996;嶫Unit3.x鍐欑殑锛屽缓璁?#27996;嗚灏?#37721;互浜?#38171;屽洜涓JUnit4?#27537;鍙樺?#26668;緝澶?#38171;屼娇鐢?#28052;?#37831;?#37826;逛究鐩磋锛屽洜姝?#37929;存帴鍙?#38000;?a href="http://www.cnblogs.com/eggbucket/archive/2012/02/02/2335697.html">JUnit4?#27537;甯?#37716;?/a>銆?/p> <table> <thead> <tr> <th>妗嗘灦杩?#29723;?#26916;?#25652;?/th> <th>瀵?#25652;?#27996;?#37837;囩</th></tr></thead> <tbody> <tr> <td>setUpBeforeClass()</td> <td>@BeforeClass</td></tr> <tr> <td> </td> <td> </td></tr> <tr> <td>setUp()</td> <td>@Beofre</td></tr> <tr> <td>testMethod1()</td> <td> </td></tr> <tr> <td>tearDown()</td> <td>@After</td></tr> <tr> <td> </td> <td> </td></tr> <tr> <td>setUp()</td> <td>@Before</td></tr> <tr> <td>testMethod2()</td> <td> </td></tr> <tr> <td>tearDown()</td> <td>@After</td></tr> <tr> <td> </td> <td> </td></tr> <tr> <td>tearDownAfterClass()</td> <td>@AfterClass</td></tr></tbody></table> <h2 id="4-?#31092;璇?#28000;涔?>4. ?#31092;璇?#28000;涔?#38171;?/h2> <p>6涓渶瑕佹祴璇曠殑鍦版柟锛圧ight-BICEP锛?#38171;?/p> <ul> <li>Right锛?#32513;撴灉鏄?#37722;?#23005;?#32429;?#38171;圧ight锛?#38171;? <li>B锛氳?#22317;晫锛Boundary锛夋潯浠?#37828;?#37722;?#23005;?#32429;?CORRECT)锛?#37721;?#38000;?#32471;?绔? <li>I锛氳兘鍚?#22955;?#29025;鍙?#37722;?#38171;圛nverse锛?#37711;?#32495;?#38171;? <li>C锛?#26473;?#29723;?#27996;?#37721;夋?#29025;锛Cross-Check锛夌殑鍏朵粬鎵嬫锛? <li>E锛?#23534;?#37714;堕敊璇?#38171;Error锛夋潯浠?#37721;戠敓锛涗娇鐢Mock瀵硅薄瀹?#37916;?#38171;屽弬鑰?#32471;?绔? <li>P锛氭弧瓒虫兘锛圥erformance锛夌殑瑕佹眰銆?</li></ul> <p>?#31092;璇?#37712;?#28729;硅緝澶氭椂锛屽彲?#20114;?#23047;鐢祴璇?#37825;版嵁鏂?#28000;?#26473;?#29723;屽噯澶?#37510;?#28003;嗘槸?#23047;鐢?#37826;?#28000;?#37722;庡氨娌?#37832;夋祴璇?#28000;爜?#28229;璧锋潵閭?#28052;?#37929;磋浜?#38171;屽洜姝櫎闈炴祴璇?#37712;?#28729;?#38344;炲父澶嶆潅锛屽惁鍒?#23052;?#37832;夊?#21616;閲?#37922;?#26473;?#37837;风殑鏂?#23534;?#37510;?#39582;朵?#26047;鏋滄祴璇?#37826;?#28000;跺嚭鐜伴敊璇?#38171;?#28003;?#38000;?#28052;?#28051;?#28751;卞嚭鐜?#27996;?#37825;版嵁?#25930;璇?#38171;?#38171;?#26473;樹細瀵?#38007;存祴璇?#28051;嶉?#26473;?#38171;屽?#28850;姞浜嗙淮鎶殑鎴?#37832;?#37510;?/p> <h2 id="5correct姝?#32429;殑杈圭?#23678;潯浠?>5.CORRECT锛?#23005;?#32429;殑锛夎?#22317;?#23678;潯浠?/h2> <ul> <li>涓鑷存?#38171;Conformance锛?#38171;?#37706;?#37828;?#37722;?#32471;?#37722;?#26864;?#37832;熺殑鏍?#23534;?#38171;? <li>鏈夊簭鎬?#38171;Ordering锛?#38171;?#28051;缁勫?#37828;?#37722;?#32471;?#37722;?#28725;规帓搴忕殑瑕佹眰锛?#37832;夊簭鎬?#37510;?#37827;犲簭鎬?#38171;?#38171;? <li>?#23599;闂存?#38171;圧ange锛?#38171;?#37706;?#37828;?#37722;?#37734;?#37722;堢悊鍙?#37706;艰寖鍥村唴锛?#37734;?#37832;灏忓?#28051;?#37832;澶?#37706;?#28052;?#38338;?#38171;?#38171;? <li>寮?#37922;?#38171;圧eference锛?鑰?#37722;?#37804;?#38171;?#28000;爜鏄?#37722;?#23534;?#37922;?#27996;?#28051;?#37721;?#28000;爜鏈韩鐩存帴鎺?#37714;剁殑澶?#38318;?#37733;犵礌锛? <li>瀛?#37734;?#37804;?#38171;Existence锛?#38171;?#37706;?#37828;?#37722;?#28699;?#37734;?#38171;?#28186;嬪锛?#38344;NULL锛岄?#28858;浂锛屽寘鍚?#27996;庢煇涓?#38342;?#37722;?#32475;夌瓑锛? <li>鍩?#37825;版?#38171;Cardinality锛?#38171;?#37828;?#37722;?#37805;?#28610;?#37832;夎冻澶熺殑鍊?#38171;?#38171;?#28052;熺涓洪泦鍚堢殑鍔?#38171;屽?#25277;泦鍚?#38322;岄潰鍖?#37722;殑鍏冪礌涓?#37825;?#38171;? <li>?#26882;闂存?#38171;圱ime锛?缁?#28725;规椂闂村拰鐩?#28725;规椂闂?#38171;?#37813;鏈夌殑浜嬫儏鏄?#37722;?#37816;夌収椤?#25652;忓?#25120;敓锛?#37828;?#37722;?#37734;?#23005;?#32429;殑?#26882;闂村?#25120;敓锛?#37828;?#37722;?#37721;婃椂鍙戠敓锛?</li></ul> <h2 id="6?#23047;鐢mock瀵硅薄">6.?#23047;鐢Mock瀵硅薄</h2> <p>Mock瀵硅薄瑙?#37712;崇殑闂?#26864;?#38171;?/p> <ul> <li>?#28257;瀹?#28725;硅薄鍏?#37832;?#28051;?#37721;?#32429;?#28729;氱殑琛?#28051;?#38171;堝锛氳?#29723;屾儏锛?#38171;? <li>?#28257;瀹?#28725;硅薄寰堥?#25424;鍒涘缓锛? <li>?#28257;瀹?#28725;硅薄?#27537;?#28999;浜?#29723;?#28051;?#23536;堥?#25424;瑙彂锛堝锛?#32515;戠?#28360;敊璇?#38171;?#38171;? <li>?#28257;瀹?#28725;硅薄浠?#32459;?#25652;忕殑杩?#29723;岄?#25652;?#23536;堟參锛? <li>?#28257;瀹?#28725;硅薄鏈?#37922;?#37812;?#37923;岄潰?#22440;鑰呭氨鏄?#37922;?#37812;?#37923;岄潰锛? <li>?#28257;瀹?#28725;硅薄?#28214;瑕?#29722;?#29831;?#38338;?#28729;?#37828;?#28641;?#28003;?#29722;?#29835;?#37922;殑锛堝锛氶獙璇佹煇涓?#37733;炶皟鍑?#37825;版槸鍚?#29722;?#29835;?#37922;?#38171;?#38171;? <li>?#28257;瀹?#28725;硅薄瀹?#38340;?#28051;?#28051;嶅瓨鍦?#38171;堝锛?#37711;朵粬寮?#24386;?#30380;缁勭殑?#24116;鍙?#37510;佹垨鑰呮煇涓?#23052;?#37832;夌殑纭?#28000;朵骇鍝?#38171;?#37510;?</li></ul> <p>Mock瀵硅薄瑙?#37712;崇殑姝?#26976;?#38171;?/p> <ul> <li>?#23047;鐢?#28051;涓帴鍙?#37833;?#37819;?#26473;?#26473;?#28051;?#28725;硅薄锛? <li>涓?#27996;?#37725;佷唬?#29212;瀹?#37916;?#26473;?#28051;帴鍙?#38171;? <li>?#20114;?#31092;璇?#28051;?#37929;殑锛屽湪Mock瀵硅薄涓?#28729;?#37916;?#26473;?#28051;帴鍙?#37510;?</li></ul> <p>?#25950;锛?#26473;?#38322;岀殑Mock涓?#37828;綉涓?#23480;?#32513;忓舰鎴?#22935;嗘灦?#27537;Mock宸?#37711;?#38171;?#37828;Mock?#27537;瀹?#37916;?#37720;熺悊銆?#28003;?#38000;?#37818;?#38013;愮殑Mock宸?#37711;?#37828;?a href="http://easymock.org/">EasyMock</a>銆?#37711;朵粬?#27537;Mock宸?#37711;?#37721;互鍙?#38000;?#37510;奫?#23047;鐢Mock杩?#29723;屽崟鍏冩祴璇]銆?https://blog.csdn.net/u011393781/article/details/52669772)</p> <h2 id="7-濂界殑?#31092;璇?#37813;鍏?#37832;夌殑鍝?#29840;a-trip">7. 濂界殑?#31092;璇?#37813;鍏?#37832;夌殑鍝?#29840;?A-TRIP)</h2> <ul> <li>?#22172;鍔?#37718;?#38171;Automatic锛?#38171;氳嚜鍔?#37718;?#37734;拌皟鐢祴璇?#37724;屾?#29025;缁撴灉锛?a href="https://www.testwo.com/article/1170">?#29238;鐢殑鎸?#32513;?#38342;嗘垚宸?#37711;?/a> <li>褰?#25652;曠殑锛圱horough锛?#38171;氭祴璇?#27996;嗘墍鏈夐渶?#30512;鍏虫敞?#27537;鎯呭喌锛?a href="https://blog.csdn.net/ohcezzz/article/details/78239927">?#29238;鐢殑浠爜瑕?#37929;?#23480;?#37711;?/a> <li>鍙?#38322;?#28598;?#38171;圧epeatable锛?#38171;氭瘡涓祴璇?#25652;?#29831;?#37913;?#32468;?#27996;?#37711;朵粬鎵鏈夌殑?#31092;璇?#38171;?#26473;樺繀椤荤嫭绔?#27996;?#37916;?#28583;?#38171;屼粠鑰屽彲?#20114;閲?#28598;?#37734;版墽琛?#38171;?#39582;朵笖浜?#37922;?#37929;?#37722;岀殑缁撴灉銆? <li>鐙?#32468;嬬殑锛圛ndependent锛?#38171;氱淇?#28051;涓?#37713;?#37825;?#37721;?#38333;?#28725;?#28051;鏍锋祴璇?#38171;?#39582;朵笖杩?#28051;祴璇?#28051;?#28186;濊禆浜?#37711;朵粬?#31092;璇?#37510;? <li>涓?#28051;氱殑锛圥rofessional锛?#38171;氭祴璇?#28000;?#37934;佸簲璇?#28051;?#27996;?#37725;佷唬?#29212;?#27537;缂栫爜椋?#37837;?#37724;岀紪鍐?#29840;?#38322;?#37929;?#37722;?</li></ul> <p>濡?#28003;曠淇濇祴璇?#28000;爜鏄?#23005;?#32429;殑鍛?#38171;?/p> <ul> <li>瀵?#27996;?#37725;佷唬?#29212;涓殑Bug杩?#29723;屼慨鏀圭殑?#26882;鍊?#28052;熸敼杩涙祴璇?#28000;爜锛?#38171;堝洜涓?#26473;?#28051;Bug鏄祴璇?#28000;爜娌?#37832;夊?#25120;幇?#27537;锛? <li>鍦?#27996;?#37725;佷唬?#29212;涓?#23534;?#37711;Bug鏉獙璇佹祴璇?#28000;爜?#27537;姝?#32429;?#37804;?#37510;?#38171;堢淇?#37721;兘?#32048;鍙戠?#29114;殑?#25930;璇?#29722;祴璇?#28000;爜鎹?#37817;夊埌浜?#38171;?</li></ul> <h2 id="8-鍦?#26916;?#37929;?#28051;?#26473;?#29723;屾祴璇?>8. 鍦?#26916;?#37929;?#28051;?#26473;?#29723;屾祴璇?/h2> <ul> <li>鎶婃祴璇?#28000;爜涓?#27996;?#37725;佷唬?#29212;鏀?#37734;?#28051;涓?#37929;綍涓?#38171;? <li>涓?#37714;?#27996;?#37711;?#27996;?#28000;爜?#27537;?#26882;鍊?#38171;岄渶瑕?#32429;?#28103;?#28003;犵殑浠爜鍙互閫?#26473;?#37813;鏈夋祴璇?#38171;? <li>?#31092;璇曠殑?#26882;闂寸偣锛? <ul> <li>缂?#37712;欐柊?#27537;鍑?#37825;?#38171;? <li>淇?#23005;Bug锛? <li>?#30241;娆?#37812;?#37716;熺紪璇戜箣鍚?#38171;? <li>?#30241;娆?#28725;圭増鏈?#37818;?#37714;剁殑?#24385;浜?#38171;? <li>鎸?#32513;?#28051;?#37826;?#37734;?#37922;?#28051;?#38338;殑鏈哄櫒鏉?#26473;?#29723;屽畬鏁寸殑鏋勫缓鍜屾祴璇?#37510;?</li></ul> <li>?#31092;璇?#37714;?#27996;虹殑椤?#37929;?#28000;爜锛?#37711;?#28729;?#28751;?#37828;?#32513;?#37814;?#37714;?#27996;虹殑椤?#37929;?#32513;?#28725;?#37828;?#28051;?#28598;?#38338;?#26864;?#38171;屽?#23678;?#26421;篃鏄?#28051;?#36423;?#26916;婚潰瀵圭殑闂?#26864;?#37510;傞渶瑕佺悊鎬殑鎬佸害锛?#28051;?#37813;?#29831;勫埆浜虹殑浠爜锛?#37510;?#37712;?#38344;欑殑鎵嬫锛?#28051;嶉殢?#31350;淇?#37824;?#37714;?#27996;虹殑浠爜锛?#37510;佹?#20343;?#21615;殑鑰愬績锛?#37711;?#28000;庢祴璇?#28000;爜寮濮?#38171;屾參?#21443;閲?#37835;?#26916;?#37929;?#28000;爜锛屼娇涔?#38322;嶆柊鍥炲埌鍋?#25652;风?#33333;?#38171;?#37510;佺?#29112;?#27537;鏅烘収锛堢煡閬?#28000;涔?#37837;风殑椤?#37929;?#25652;?#29831;?#26440;惧埌浠涔?#37837;风殑鐩?#37837;?#38171;?#28051;?#37813;?#37931;浜?#38322;?#37835;勬垚涓涓?#28729;岀?#24227;殑鐘舵?#38171;屼篃涓?#32480;鍗曟?#24807;?#20910;殢涔嬭嚜鐢熻嚜鐏?#37510;?#38171;? <li>?#31092;璇?#28051;?#29831;勫锛?#28051;?#28051;?#38007;?#37928;?#37718;?#26916;朵釜璇?#38017;?#27996;?#38171;屾斁涓嬭嚜鎴戠殑鎵?#37931;锛屾帴绾?#37722;勭涓?#37722;岀殑鎰?#29785;?#38171;屾墠?#20824;?#20187;鍑轰护?#22172;宸辨弧鎰忕殑椤?#37929;?#37510;?</li></ul> <h2 id="9-璁?#29825;?#29831;?#26864;?>9. 璁?#29825;?#29831;?#26864;?/h2> <ul> <li>?#28528;鍚戞祴璇曠殑璁?#29825;?#38171;?#28051;?#37826;逛究?#31092;璇曠殑璁?#29825;?#28051;?#37828;?#28610;界殑璁?#29825;?#38171;?#29831;?#37828;?#29825;?#29825;?#26473;?#27996;庡兊鍖栨垨鑰?#38007;?#38002;?#38171;岄渶瑕?#32480;鍖栨垨鑰?#28103;?#37824;逛娇涔?#37831;村埄鐢?#37832;?#37833;殑鎵?#28766;?#37724;?#32513;?#37814;?#37510;? <li>?#28528;鍚戞祴璇曠殑閲?#37835;?#38171;?#28051;?#37826;逛究?#31092;璇曠殑浠爜涓?#37828;?#28610;界殑浠爜锛?#29831;?#37828;?#28051;氬姟娣锋潅鍦?#28051;璧?#38171;屾棤?#30838;瀹?#37916;?#28051;涓?#37713;?#37825;?#37721;?#38333;?#28725;?#28051;鏍锋祴璇?#38171;岄渶瑕佷慨鏀?#29825;?#29825;娇涓氬姟鍒嗙銆? <li>?#31092;璇曠?#33636;殑涓?#37721;?#37804;?#38171;?#28751;?#37828;?#28725;圭?#33636;殑鏂?#29815;蹇?#26916;?#28051;虹湡銆? <ul> <li>鏈夊簭鎬?#37510;?#28186;嬪锛歴orted list绫荤殑涓?#37721;?#37804;?#28751;?#37828;?#37827;?#29825;?#37721;戠?#29110;粈涔?#38171;?#32513;撴灉?#20824;搴?#29831;?#37828;?#37832;夊?#24533;殑銆? <li>缁撴?#21227;寲銆?#28186;嬪锛?#29825;?#37719;曠?#33636;粺涓瘡涓?#37833;?#37929;?#36423;?#26916;?#28766;?#27996;?#28051;涓?#29825;?#37719;?#38171;?#28051;涓?#29825;?#37719;?#37815;?#37832;?#28051;涓垨澶?#28051;?#37833;?#37929;?#37510;? <li>鏁?#28699;?#28051;?#37721;?#37804;?#37510;?#28186;嬪锛氶琛岃̎鍙风殑?#27537;鍊?#29840;峰繀椤?#39582;宠銆? <li>鏁版嵁涓鑷存?#37510;?#28186;嬪锛氬晢鍝佹?#37825;?搴?#28699;?#37825;?閿鍞?#37825;?#37510;?</li></ul> <li>?#31092;璇曢鍔殑璁?#29825;?#37510;備娇浣?#28003;?#28051;?#27996;?#37725;佷唬?#29212;?#27537;鐢?#37812;?#37734;?#32514;栫爜锛?#38000;?#28051;?#37828;?#27996;?#37725;?#23534;鍙戣?#37734;?#32514;栫爜锛屽紑鍙戠?#25780;灉鏇磋兘鍙?#25652;?#37922;?#37812;风殑?#28214;?#30512;銆? <li>?#31092;璇?#37827;?#37825;堢殑鍙?#37825;?#37510;傚綋浣?#28003;?#28051;?#27996;?#37725;佷唬?#29212;?#27537;鐢?#37812;锋椂锛屼?#29363;墠?#20824;鐪熸纭?#28729;?#37725;?#27996;?#29840;?#28000;?#25652;?#29831;?#28003;?#37833;?#37813;?#37815;?#38171;?#38000;屽摢浜?#37828;?#28051;嶉渶瑕佺殑銆?#28186;嬪锛?#37827;?#37825;堢殑鍙?#37825;?#25652;?#29831;?#37922;?#37725;?#28051;?#37713;?#37825;版潵鎵?#37815;呮?#29025;璐?#28000;诲憿锛?</li></ul> </li><img src ="http://www.67529968.com/zhuyuanxiang/aggbug/433606.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-16 17:57 <a href="http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433606.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>銆?#38322;?#37835;?#37510;嬬殑璇?#28052;?#32471;?#29825;?amp;ndash;鏂规硶鍒楄http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433605.html鏈?#26473;?#32520;?/dc:creator>鏈?#26473;?#32520;?/author>Wed, 16 Jan 2019 09:50:00 GMThttp://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433605.htmlhttp://www.67529968.com/zhuyuanxiang/comments/433605.htmlhttp://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433605.html#Feedback0http://www.67529968.com/zhuyuanxiang/comments/commentRss/433605.htmlhttp://www.67529968.com/zhuyuanxiang/services/trackbacks/433605.html绗?绔?閲?#37835;勫?#26948;
  • 6.1 (P110)Extract Method锛堟彁鐐煎嚱鏁?#38171;?/a>
  • 6.2 Inline Method锛?#37712;呰?#26047;嚱鏁?#38171;?17
  • 6.3 Inline Temp锛?#37712;呰仈涓存椂鍙?#38322;?#38171;?19
  • 6.4 Replace Temp with Query锛堜互?#29025;璇?#37721;?#28000;?#28051;存椂鍙?#38322;?#38171;?20
  • 6.5 Introduce Explaining Variable锛?#23534;?#37711;?#29785;?#38322;婃?#37721;?#38322;?#38171;?24
  • 6.6 Split Temporary Variable锛?#37714;嗚涓存椂鍙?#38322;?#38171;?28
  • 6.7 Remove Assignments to Parameters锛堢?#23130;櫎瀵?#37721;?#37825;扮殑璧嬪?#38171;?31
  • 6.8 Replace Method with Method Object锛堜互鍑?#37825;?#28725;硅薄鍙?#28000;?#37713;?#37825;?#38171;?35
  • 6.9 Substitute Algorithm锛?#37831;?#37817;?#32480;楁硶锛?39
  • 绗?绔?鍦?#28725;硅薄涔?#38338;存惉绉荤?#35268;?41
  • 7.1 Move Method锛堟惉绉?#37713;?#37825;?#38171;?42
  • 7.2 Move Field锛堟惉绉?#28699;楁锛?46
  • 7.3 Extract Class锛堟彁鐐?#32491;?#38171;?49
  • 7.4 Inline Class锛?#28751;嗙被鍐呰?#26047;寲锛?54
  • 7.5 Hide Delegate锛堥殣钘?#37413;?#28654;?#37813;?#37711;?#32495;?#37413;?#38171;?57
  • 7.6 Remove Middle Man锛堢?#23130;櫎涓?#38338;?#27996;?#38171;?60
  • 7.7 Introduce Foreign Method锛?#23534;?#37711;?#28598;?#37716;犲嚱鏁?#38171;?62
  • 7.8 Introduce Local Extension锛?#23534;?#37711;?#37832;?#37734;版墿灞?#38171;?64
  • 绗?绔?閲嶆柊缁勭粐鏁版嵁
  • 绗?绔?绠鍖?#37833;?#28000;?#29723;?#26440;惧紡 237
  • 10.1 Rename Method锛堝嚱鏁版敼鍚?#38171;?73
  • 10.2 Add Parameter锛堟坊鍔犲弬鏁?#38171;?75
  • 10.3 Remove Parameter锛堢?#23130;櫎鍙?#37825;?#38171;?77
  • 10.4 Separate Query from Modifier锛?#28751;嗘煡璇?#37713;?#37825;?#37724;屼慨鏀瑰嚱鏁?#37714;嗙锛?79
  • 10.5 Parameterize Method锛?#28000;?#37713;?#37825;版惡甯?#37721;?#37825;?#38171;?83
  • 10.6 Replace Parameter with Explicit Methods锛堜互鏄庣鍑?#37825;?#37721;?#28000;?#37721;?#37825;?#38171;?85
  • 10.7 Preserve Whole Object锛?#28103;濇?#20344;?#30789;薄瀹?#37825;?#38171;?88
  • 10.8 Replace Parameter with Methods锛堜互鍑?#37825;?#37721;?#28000;?#37721;?#37825;?#38171;?92
  • 10.9 Introduce Parameter Object锛?#23534;?#37711;?#37721;?#37825;?#28725;硅薄锛?95
  • 10.10 Remove Setting Method锛堢?#23130;櫎璁惧煎嚱鏁?#38171;?00
  • 10.11 Hide Method锛堥殣钘忓嚱鏁?#38171;?03
  • 10.12 Replace Constructor with Factory Method锛堜互宸?#37720;傚嚱鏁?#37721;?#28000;?#37835;?#38315;犲嚱鏁?#38171;?04
  • 10.13 Encapsulate Downcast锛?#28751;佽鍚?#28051;?#26462;瀷锛?08
  • 10.14 Replace Error Code with Exception锛堜互寮傚父鍙?#28000;敊璇爜锛?10
  • 10.15 Replace Exception with Test锛堜互?#31092;璇?#37721;?#28000;?#23534;傚父锛?15
  • 绗?1绔?澶勭悊姒?#37815;?#37711;?#32495;?319

      绗?绔?閲?#37835;勫?#26948;

      5.1 閲?#37835;勭殑璁板?#26335;牸寮?03

      杩?#28051;?#37837;?#23534;忓彲?#20114;浣?#28051;鸿嚜宸?#37832;?#37833;?#29825;板綍閲?#37835;勬?#23339;硶?#27537;鏍囧噯锛?#37826;逛究?#29025;闃呰嚜宸卞父鐢殑鍜屾荤?#25782;殑閲?#37835;?#37826;?#23534;?#38171;?/p>

      • 鍚嶇锛?#38322;?#37835;勮?#23942;琛?
      • 姒傝锛?#38315;?#37922;殑鎯呮櫙锛屼互鍙?#37813;?#20187;?#27537;浜嬫儏
      • 鍔?#37832;?#38171;氳鏄?#37413;?#28051;轰粈涔堥渶瑕?#37413;?#37724;?#37413;?#28000;涔堟?#21613;喌涓嶅仛鈥?
      • ?#20187;?#30838;锛?#38322;?#37835;勭殑姝?#26976;?#38171;堢湅浼?#32480;鍗?#38171;?#37711;?#28729;?#23536;?#38322;?#29781;?#38171;屽洜涓?#38322;?#37835;?#28051;嶅缓璁?#29882;宠瀹屾垚锛?#37832;濂?#28103;?#29831;佹瘡娆?#28051;?#30380;姝兘鏄?#23005;?#32429;殑锛?
      • ?#23510;渚?#38171;?#38315;?#26473;?#28186;嬪瓙姝?#32429;殑?#24714;瑙?#38322;?#37835;勬?#23339;硶?#27537;鎿?#28003;?#37826;?#23534;?

      5.2 瀵?#37813;惧紩鐢?#37904;?05

      寮?#37922;?#37904;?#38171;?#28751;?#37828;?#38317;?#27996;涜閲?#37835;勭殑浠爜琚?#37725;?#27996;?#28000;爜璋?#37922;?#27996;?#37510;?#37916;?#37734;殑閲?#37835;勫伐鍏?#23480;?#32513;忓彲?#20114;绠鍖?#26473;?#27996;涙搷浣?#38171;屼?#21976;槸宸?#37711;锋案杩滈兘鏄?#37832;夐?#24878;殑锛岄櫎浜?#23480;?#37711;?#26473;樺簲璇?#37908;熸倝涓浜?#37737;?#37832;殑鎿?#28003;?#37813;嬫銆?/p>

      5.3 杩?#27996;?#38322;?#37835;勬?#23339;硶鏈夊鎴?#37908;?06

      瀛?#28052;犲?#23676;娇鐢?#26473;?#27996;?#38322;?#37835;勪粎浠?#37828;?#28051;?#29863;?#37904;?#38171;?#28051;氬姟鍦?#37721;?#37510;?#23480;?#37711;?#37734;?#37721;?#37510;?#29831;?#29815;鍦?#37721;?#37510;佸浜嬬墿?#27537;?#24714;瑙?#28052;?#37734;?#37721;?#38171;屽洜姝?#28729;?#37711;尯鏈夎嚜宸辩殑閲?#37835;勬?#23339;?#22443;墠鏄?#37832;缁堢殑鐩?#37837;?#37510;?/p>

      6.1 (P110)Extract Method锛堟彁鐐煎嚱鏁?#38171;?/h3>

      鍔?#37832;?#38171;歀ong Methods闂?#26864;樻垨鑰?#28000;爜?#28214;瑕丆omments闂?#26864;?#38171;?
      鏂规硶锛?#38171;?#37721;互?#23047;鐢IDE?#24385;渚涚殑閲?#37835;勫伐鍏?#38171;?#28051;嬮潰?#27537;鍏?#28003;撴搷浣滅殑鍘熺悊锛?/p>

      • 鍒?#38315;?#28051;涓柊鍑?#37825;?#38171;屾?#35268;嵁杩?#28051;?#37713;?#37825;扮殑鎰忓?#28844;潵瀵?#28729;冨?#34249;悕锛?
      • 灏嗘彁鐐肩殑浠爜鎷?#29840;?#37714;版柊?#32531;鍑?#37825;?#28051;?#38171;?
      • 妫?#29025;?#24385;鐐肩殑浠爜鏄?#37722;?#23534;?#37922;?#27996;?#37413;?#28003;?#37922;煙闄?#27996;?#37720;熷嚱鏁?#37413;濈殑鍙?#38322;?#38171;堝眬閮?#37721;?#38322;?#37510;?#37720;熷嚱鏁?#37721;?#37825;?#38171;?
      • 妫?#29025;?#24385;鐐肩殑浠爜鏄?#37722;?#37718;?#37722;?#27996;?#37413;?#28000;?#37922;?#27996;?#29722;彁鐐?#28000;爜娈?#37413;濈殑涓存椂鍙?#38322;?
        • 濡?#37835;?#37832;?#38171;屽湪鐩?#37837;囧嚱鏁?#28051;?#28751;嗕?#23338;?#29256;槑涓?#28766;閮?#37721;?#38322;?
      • 妫?#29025;琚彁鐐?#28000;爜娈?#38171;岀湅?#28229;鏄?#37722;?#37832;?#28000;讳?#26334;眬閮?#37721;?#38322;忕殑鍊艰?#31916;鏀?#37721;?#38171;?
        • 濡?#37835;?#28051;存椂鍙?#38322;忕殑鍊艰淇?#37824;?#27996;?#38171;屽璇?#28751;嗘彁鐐肩殑浠爜鍙?#28051;?#28051;涓煡璇?#38171;屽?#21977;?#25780;灉杩斿洖缁?#37929;?#37711;?#37721;?#38322;?#38171;?
        • 濡?#37835;?#28051;?#28610;?#37823;?#28003;?#38171;屾垨鑰呰淇?#37824;圭殑鍙?#38322;忓浜?#28051;涓?#38171;屽彲?#20114;灏?#29831;?#38171;?#37714;嗚涓存椂鍙?#38322;??#20114;?#29025;璇?#37831;?#37817;?#37721;?#38322;?#38171;夌?#22795;?#23339;浜?#37510;?
      • 灏嗚?#24385;鐐?#28000;爜娈?#28051;渶瑕?#29722;?#29831;?#37721;栫殑灞閮?#37721;?#38322;?#38171;屽綋鍙?#37825;颁紶缁?#37929;?#37837;囧嚱鏁?
      • 澶勭悊瀹屾墍鏈夊眬閮?#37721;?#38322;忓悗锛岀紪璇?#38171;屾?#29025;
      • 鍦?#23143;?#37713;?#37825;?#28051;?#38171;屽?#21978;?#24385;鐐肩殑浠爜鏇?#37817;?#28051;?#28725;?#37929;?#37837;囧嚱鏁扮殑璋?#37922;?
      • 缂?#29831;?#38171;屾?#29025;锛屾祴璇?

      6.2 Inline Method锛?#37712;呰?#26047;嚱鏁?#38171;?17

      鍔?#37832;?#38171;?#35120;?#37713;?#37825;?#37712;?#38318;殑浠爜涓?#37711;?#37722;嶇涓鏍?#37828;撴噦锛屽彲?#20114;鍦?#37713;?#37825;拌皟鐢?#37904;规彃鍏?#37713;?#37825;?#37832;?#28003;?#38171;岀?#23130;櫎璇?#37713;?#37825;?#37510;?br>琛?#37711;?#38171;?#28725;?#37832;?#28051;缇?#28051;?#28598;?#37722;堢悊?#27537;鍑?#37825;?#38171;屽彲?#20114;鍏?#37712;呰仈涓?#28051;涓?#38336;垮嚱鏁?#38171;岀劧鍚庡?#23942;彁鐐煎嚭鍚堢悊?#27537;灏忓嚱鏁?/p>

      6.3 Inline Temp锛?#37712;呰仈涓存椂鍙?#38322;?#38171;?19

      鍔?#37832;?#38171;?#35120;?#28051;存椂鍙?#38322;忓彧琚?#28051;涓?#32480;鍗曠殑琛?#26440;惧紡璧嬪?#28051;娆?#38171;?#38000;?#28051;?#28729;?#28641;?#32432;?#37711;朵粬閲?#37835;?#37826;规硶?#26882;锛屾墠?#28214;瑕?#38322;?#37835;?br>鏉?#28000;?#38171;欼nline Temp澶?#37719;?#37828;?#28051;Replace Temp with Query锛堜互?#29025;璇?#37721;?#28000;?#28051;存椂鍙?#38322;?#38171;夊噯澶?br>鏂规硶锛?#28751;嗘墍鏈夊璇?#37721;?#38322;忕殑寮?#37922;?#37716;?#28003;?#37831;?#28000;?#37812;?#28725;?#28729;?#29863;嬪肩殑琛?#26440;惧紡鏈韩銆?/p>

      6.4 Replace Temp with Query锛堜互?#29025;璇?#37721;?#28000;?#28051;存椂鍙?#38322;?#38171;?20

      鍔?#37832;?#38171;?#28003;犵殑绋?#25652;忎互涓涓?#28051;存椂鍙?#38322;?#28103;?#28699;?#28051;涓?#29723;?#26440;惧?#24533;殑璁?#32480;?#32513;撴灉
      鏂规硶锛?#28751;嗚杈惧紡?#24385;鐐煎?#34425;嫭绔嬬殑鍑?#37825;?#38171;岀劧鍚?#28051;存椂鍙?#38322;忕殑璋?#37922;?#37831;?#37817;?#37812;愭柊鍑?#37825;扮殑璋?#37922;?#37510;?#23005;?#37722;庢柊鍑?#37825;颁?#29115;兘琚?#29835;?#37922;?#37510;?
      鍏?#28003;撴?#35268;硶锛?灏嗘彁鐐煎?#28888;潵?#27537;鍑?#37825;?#37922;private淇饰锛屽鏋滅嫭绔嬪嚱鏁?#37832;夊壇浣?#37922;?#38171;岄偅瀵?#28729;?#26473;?#29723;孲eparate Query from Modifier锛?#28751;嗘煡璇?#37713;?#37825;?#37724;屼慨鏀瑰嚱鏁?#37714;嗙锛?/p>

      6.5 Introduce Explaining Variable锛?#23534;?#37711;?#29785;?#38322;婃?#37721;?#38322;?#38171;?24

      灏?#28598;嶆?#20637;杈惧紡锛堟垨鑰?#37711;朵腑涓閮?#37714;?#38171;夌殑缁撴灉璧嬪?#32513;?#28051;涓?#28051;存椂鍙?#38322;?#38171;?#37922;?#28051;存椂鍙?#38322;忓?#23943;?#29256;潵瑙?#38322;?#29723;?#26440;惧?#24533;殑鐢?#38315;?/p>

      6.6 Split Temporary Variable锛?#37714;嗚涓存椂鍙?#38322;?#38171;?28

      涓存椂鍙?#38322;?#29722;?#29863;嬪?#29906;?#26473;?#28051;娆?#38171;屼?#21976;槸瀹?#37827;?#28051;?#37828;?#23536;?#37916;?#37721;?#38322;?#28052;?#28051;?#37828;?#29722;?#37922;?#27996;?#37824;堕泦璁?#32480;?#32513;撴灉
      鍘熷洜锛?#28051;涓?#37721;?#38322;忓簲璇?#37813;?#37815;?#28051;涓?#29840;?#28000;?#38171;屽鏋滆璧嬪?#28598;?#23046;?#23536;?#37721;兘鎵?#37815;?#27996;?#28598;?#28051;?#29840;?#28000;?br>鏂规硶锛氶拡瀵规瘡娆?#29863;嬪?#38171;屽?#28056;?#28888;柊?#27537;涓存椂鍙?#38322;?/p>

      6.7 Remove Assignments to Parameters锛堢?#23130;櫎瀵?#37721;?#37825;扮殑璧嬪?#38171;?31

      java鏄?#37706;?#28028;?#38315;?#38171;屽鍙?#37825;扮殑浠讳綍淇?#37824;归兘涓嶄細瀵硅皟鐢?#32468;?#27996;?#37922;熷奖鍝?#38171;屾墍?#20114;瀵?#27996;?#37922;?#26473;囧紩鐢?#28028;?#38315;掔殑浜?#37721;兘?#32048;鍙戠?#29114;悊瑙敊璇?
      鍙?#37825;?#25652;?#29831;?#28000;?#29723;?#32448;?#37413;滆浼?#38315;?#26473;?#37833;殑涓滆鈥?/p>

      6.8 Replace Method with Method Object锛堜互鍑?#37825;?#28725;硅薄鍙?#28000;?#37713;?#37825;?#38171;?35

      鍔?#37832;?#38171;?#37734;?#28598;?#37736;嬪嚱鏁?#37712;?#38171;屽?#29808;眬閮?#37721;?#38322;忕殑?#23047;鐢?#28725;?#38007;撮毦?#20114;?#23047;鐢Extract Method锛堟彁鐐煎嚱鏁?#38171;?#26473;?#29723;?#38322;?#37835;?br>鏂规硶锛?#28751;?#26473;?#28051;?#37713;?#37825;版斁鍏?#28051;涓?#28725;硅薄閲?#38171;屽眬閮?#37721;?#38322;忓彉鎴?#28725;硅薄鎴愬憳鍙?#38322;?#38171;岀劧鍚庡彲?#20114;鍦?#37722;?#28051;瀵硅薄涓?#28751;?#26473;?#28051;?#28598;?#37736;嬪嚱鏁?#37714;嗚涓?#28598;?#28051;?#28751;忓?#23338;嚱鏁?#37510;?
      鍘熷洜锛?#28766;閮?#37721;?#38322;忎細澧炲?#29362;?#21978;鍑?#37825;扮殑鍥伴?#24807;害

      6.9 Substitute Algorithm锛?#37831;?#37817;?#32480;楁硶锛?39

      鎶婃煇涓?#32480;楁硶鏇?#37817;?#37812;?#37831;存竻鏅扮殑鏂规硶锛?#32480;楁硶锛?#37510;?/p>

      绗?绔?鍦?#28725;硅薄涔?#38338;存惉绉荤?#35268;?41

      鏈?#32468;犵殑閲?#37904;?#37828;惉绉?#38171;圡ove锛?#37510;?#37413;?#37712;?#28729;?#37814;?#29840;?#28000;?#37824;?#37734;?#37725;?#38322;?#37413;?#37828;潰鍚戝?#30789;薄璁?#29825;?#28051;?#37832;閲?#29781;佺殑浜嬫儏涔?#28051;锛屼?#21976;槸鍒?#23534;濮?#29825;?#29825;椂锛?#37922;?#27996;?#37814;鏈?#37724;?#28051;氬姟?#29025;璇嗙殑涓嶈冻鏃犳硶淇?#29831;佸仛鍑虹殑鍐?#28729;?#37828;?#23005;?#32429;殑锛岄偅涔?#37722;?#37832;熻皟鏁?#28051;?#28751;?#37413;?#29840;?#28000;?#37413;濇惉绉?#37714;版纭殑瀵硅薄涓?#28751;?#37828;?#38322;?#29781;佺殑閲?#37835;勬?#23339;銆?#38000;孧ove Method锛?42锛夊拰Move Field锛?46锛夊氨鏄惉绉?#37413;?#29840;?#28000;?#37413;?#26473;囩涓?#37832;鍩?#37832;殑涓?#28051;?#37826;规硶銆?/p>

      7.1 Move Method锛堟惉绉?#37713;?#37825;?#38171;?42

      鍔?#37832;?#38171;?#32491;?#28051;煇涓?#37713;?#37825;?#28051;?#37711;朵粬绫?#27996;?#27996;?#26473;囧
      鏂规硶锛?#28751;嗚鍑?#37825;版惉绉诲埌浜?#27996;?#37832;澶氱殑绫?#38322;岄潰锛屽?#21976;棫鍑?#37825;?#37721;?#37812;愬鎵樺嚱鏁版垨鑰?#37714;犻櫎銆?
      鍏?#28003;撴?#35268;硶锛?/p>

      • 妫?#29025;婧?#32491;?#28051;?#29722;?#23143;?#37713;?#37825;颁娇鐢殑涓鍒囩?#35268;?#38171;屽鏋滅?#35268;?#29722;?#37711;朵粬鍑?#37825;颁娇鐢?#38171;?#38000;冭檻杩?#27996;?#37713;?#37825;?#28051;璧锋惉绉?
      • 妫?#29025;婧?#32491;荤殑?#29913;绫?#37724;岃秴绫?#38171;岀湅?#28229;鏄?#37722;?#37832;?#29831;?#37713;?#37825;扮殑澹版槑锛屽鏋滃嚭鐜?#38171;屽緢鍙兘涓嶈兘?#24777;绉?#37510;?
      • 鐩?#37837;?#32491;婚渶瑕佷娇鐢?#23143;?#32491;荤殑鐗规?#38171;?
        1. 灏嗚鐗规?#26462;?#32457;诲埌鐩?#37837;?#32491;?#38171;?
        2. ?#32531;绔?#37929;?#37837;?#32491;?#37714;版簮绫?#28052;?#38338;村紩鐢?#37510;?
        3. 灏嗘簮绫讳綔涓?#37721;?#37825;颁紶缁?#37929;?#37837;?#32491;?
        4. 灏嗚鐗规?#28003;?#28051;?#37721;?#37825;颁紶缁?#37929;?#37837;?#32491;?
      • 濡?#37835;?#23143;?#37713;?#37825;板寘鍚?#23534;傚父澶勭悊锛岄渶瑕?#38000;冭檻鏄?#37734;?#37929;?#37837;?#32491;?#26473;?#37828;?#23143;?#37713;?#37825;?#28598;勭悊

      7.2 Move Field锛堟惉绉?#28699;楁锛?46

      鍔?#37832;?#38171;?#32491;?#28051;煇涓?#28699;楁琚?#37711;朵粬绫?#26864;戠?#20343;娇鐢?#38171;堝寘鎷?#38171;?#28028;犲弬鏁?#37510;?#29835;?#37922;?#37721;?#37706;煎嚱鏁?#37510;?#29835;?#37922;?#29825;惧煎嚱鏁?#38171;?br>鏂规硶锛?#28751;嗚瀛楁?#22443;惉绉诲埌鐩?#37837;?#32491;?br>鍏?#28003;撴?#35268;硶锛?/p>

      • 鍏?#28751;佽杩?#28051;?#28699;楁锛?
      • 鍦?#37929;?#37837;?#32491;诲缓绔?#26473;?#28051;?#28699;楁锛?#39582;朵笖灏佽锛?
      • 璁惧畾鐩?#37837;囧?#30789;薄锛?
      • 鏇?#37817;?#28725;规簮瀛楁?#30005;殑寮?#37922;?#28051;?#37929;?#37837;?#32491;荤殑鍙?#37706;煎嚱鏁?

      7.3 Extract Class锛堟彁鐐?#32491;?#38171;?49

      鍔?#37832;?#38171;?#28051;涓?#32491;诲仛浜?#28051;?#28051;?#32491;荤殑浜?br>鏂规硶锛?/p>

      • ?#32531;绔嬫柊绫?#38171;屽皢鐩?#25652;旂殑瀛楁鍜屽嚱鏁版斁鍒版柊绫?
      • ?#23047;鐢Move Field閲?#37835;?#38171;?
      • ?#23047;鐢Move Method閲?#37835;?#38171;?
      • 鍒?#37826;?#37828;?#37722;渶瑕?#37711;?#23534;?#26570;绫?#37510;?

      7.4 Inline Class锛?#28751;嗙被鍐呰?#26047;寲锛?54

      鍔?#37832;?#38171;氭煇涓?#32491;?#37716;熻兘澶?#28751;?#38171;?#28051;Extract Class锛堟彁鐐?#32491;?#38171;?#37929;?#37721;?鏂规硶锛?#28751;?#26473;?#28051;?#32491;荤殑鎵鏈夌?#35268;惉绉诲埌鍙?#28051;绫?#28051;?#38171;岀?#23130;櫎璇?#32491;?#37510;?br>鍘熷洜锛?#28598;?#23046;Extract Class鍚?#38171;屽?#29114;被澶?#38318;?#37714;嗗?#29115;兘琚?#32457;?#29863;?#38171;屽皢杩?#28051;?#38016;庣缉绫?#28051;?#37711;朵粬鐩?#26473;戠殑绫?#37722;?#39582;?/p>

      7.5 Hide Delegate锛堥殣钘?#37413;?#28654;?#37813;?#37711;?#32495;?#37413;?#38171;?57

      鍔?#37832;?#38171;?#28729;?#37812;?#32468;?#38315;?#26473;囧鎵?#32491;?#37833;?#37721;?#23536;?#37721;?#28051;涓?#28725;硅薄?#27537;淇?#37805;?
      鏂规硶锛?#37734;?#37832;嶅姟绫?#28051;婂缓绔?#28729;?#37812;?#32468;?#37813;?#28214;鏁版嵁?#27537;鍑?#37825;?#38171;岀劧鍚庨殣钘忓鎵?#37711;?#32495;?br>渚濇嵁锛?#32471;?#37722;?#37413;?#28751;佽鈥濈殑鐗规?#37510;傚綋濮?#37813;?#32491;?#37721;戠敓鍙樺寲涓嶄細瀵?#28729;?#37812;?#32468;?#38315;?#37812;愬奖鍝?#38171;屽?#24531;?#25117;鎴?#32468;?#28051;?#29835;?#37922;?#38000;?#28052;?#38338;寸殑鑰?#37722;?#37804;?#37510;?/p>

      7.6 Remove Middle Man锛堢?#23130;櫎涓?#38338;?#27996;?#38171;?60

      鍔?#37832;?#38171;氭煇涓?#32491;诲仛浜?#26473;囧?#27697;殑濮?#37813;樺姩浣?br>鏂规硶锛?#29825;?#28729;?#37812;?#32468;?#37929;存帴璋?#37922;?#28654;?#37813;?#32491;?#38171;?#28051;Hide Delegate锛堥殣钘?#37413;?#28654;?#37813;?#37711;?#32495;?#37413;?#38171;?#37929;?#37721;?渚濇嵁锛?#35120;?#37720;熷鎵?#32491;荤殑鐗规?#29906;婃潵瓒?#28598;?#38171;?#37832;嶅姟绫荤殑濮?#37813;樺嚱鏁?#28751;嗚?#23107;潵瓒婇暱锛岄渶瑕?#29825;?#28729;?#37812;?#32468;?#37929;存帴璋?#37922;?#38171;岄伩鍏?#37832;嶅姟绫?#23052;?#28051;?#28051;?#38338;?#27996;?#37510;?/p>

      7.7 Introduce Foreign Method锛?#23534;?#37711;?#28598;?#37716;犲嚱鏁?#38171;?62

      鍔?#37832;?#38171;氫娇鐢殑绫?#37827;犳硶?#24385;渚涙煇涓?#37716;熻兘锛屼?#21976;槸鍙?#28051;嶈兘淇?#37824;?#29831;?#32491;?br>鏂规硶锛氭柊?#32531;鍑?#37825;?#38171;?#39582;?#28751;?#37832;嶅姟绫荤殑瀵硅薄瀹?#28186;?#28003;?#28051;?#37721;?#37825;颁紶鍏?#37510;?br>鍏?#28003;?#37716;?#37832;?#38171;?#28641;?#37835;滈渶瑕?#28051;?#37832;嶅姟绫诲?#28850;?#29362;閲忕殑鏂规硶锛?#29831;?#38000;冭?#25116;娇鐢Introduce Local Extension锛?#23534;?#37711;?#37832;?#37734;版墿灞?#38171;?/p>

      7.8 Introduce Local Extension锛?#23534;?#37711;?#37832;?#37734;版墿灞?#38171;?64

      鍔?#37832;?#38171;氫娇鐢殑绫?#37827;犳硶?#24385;渚?#28598;?#28051;?#37716;熻兘锛屼?#21976;槸鍙?#28051;嶈兘淇?#37824;?#29831;?#32491;?br>鏂规硶锛氬缓绔嬫柊?#27537;绫?#38171;屽湪?#26570;绫?#28051;缓绔嬮渶瑕佺殑鍔熻兘鍑?#37825;?#38171;屽彲?#20114;浣?#28051;?#37832;嶅姟绫荤殑?#29913;绫?#28729;?#37916;版柊?#27537;绫?#38171;屼篃鍙互鍖呰鏈嶅姟绫?#28729;?#37916;版柊?#27537;绫?#37510;?br>鍏?#28003;撴?#21613;喌锛?/p>

      • 棣?#38315;夊瓙绫?#38171;屽伐浣?#38322;?#37832;?#30380;
        • 浣嗘槸蹇?#26916;?#37734;?#28725;硅薄鍒涘缓鏈?#28729;?#37826;?#38171;屽鏋?#28051;?#29723;屽氨鍙兘閫?#37815;?#37718;呰绫?#38171;?
        • ?#29913;绫荤殑瀵硅薄涓嶈兘淇?#37824;圭?#21057;?#33636;殑鏁版嵁锛屽惁鍒欏缓璁?#38315;?#37815;?#37718;呰绫?#38171;屽洜涓轰細瀵?#38007;寸?#21057;被瀵硅薄涓庡瓙绫?#28725;硅薄?#27537;鏁版嵁鍙兘涓?#28051;鑷?
      • 鍖呰绫婚渶瑕?#28729;?#37916;拌鍖呰?#21613;?#30789;薄?#27537;鎵鏈夋帴鍙?#38171;屽伐浣?#38322;忓緢澶?#37510;?

      绗?绔?閲嶆柊缁勭粐鏁版嵁

      鏈?#32468;?#38322;?#37904;?#37828;?#28641;?#28003;?#37831;村鍦?#28751;佽鍚勭绫诲?#23340;殑鏁版嵁銆?#37832;?#29238;鐢殑鎵嬫灏?#37828;疭elf Encapsulate Field锛?71锛?/p>

      8.1 Self Encapsulate Field锛堣嚜灏佽?#21613;?#26945;锛?71

      鍔?#37832;?#38171;?#37929;存帴璁?#38338;?#28051;涓?#28699;楁锛屼?#21976;槸瀛楁涔?#38338;寸殑鑰?#37722;?#37711;?#32495;?#38315;愭笎鍙?#23536;?#32471;?#37815;?#37510;?
      鏂规硶锛氳嚜灏佽?#21613;氨鏄?#37734;?#28725;?#27996;?#32491;?#37712;?#38318;殑瀛楁涔?#28751;佽涓涓?#29825;惧?#37721;?#37706;肩殑鍑?#37825;?#37510;?
      浜?#29825;?#38171;?#28699;楁璁?#38338;?#37826;?#23534;?#37828;?#37929;存帴璁?#38338;?#26473;?#37828;?#38338;存帴璁?#38338;?#28051;鑷?#27996;?#29825;?#28051;?#37826;?
      闂存帴璁?#38338;殑濂?#28598;?#38171;?/p>

      • ?#29913;绫?#37721;互閫?#26473;?#29781;?#37929;?#28051;涓?#37713;?#37825;版潵鏀?#37721;樿幏鍙?#37825;版嵁?#27537;閫?#23536;?#38171;?
      • 鏀?#37816;?#37831;寸?#22443;?#33636;殑鏁版嵁绠悊锛屽?#20634;欢杩?#37716;?#26462;?#38171;堥渶瑕?#37922;?#37714;版墠鍔?#26462;?#38171;夌瓑銆?#37929;存帴璁?#38338;殑濂?#28598;?#38171;?#28000;爜瀹?#37828;?#29831;?#37811;?#38171;岀悊瑙?#28051;嶉渶瑕?#26462;?#37817;?#28051;?#37721;?#37706;煎嚱鏁?#37510;?

      8.2 Replace Data Value with Object锛堜互瀵硅薄鍙?#28000;?#37825;版嵁鍊?#38171;?75

      鍔?#37832;?#38171;?#37707;囧涓涓?#37825;版嵁椤归渶瑕?#28051;?#37711;朵粬鏁版嵁涓璧蜂娇鐢墠鏈夋剰涔?#37510;?#37825;版嵁宸?#32513;?#28051;?#28000;?#28000;?#37922;?#28051;鏉?#32480;鍗曠殑鏁版嵁椤圭?#21228;垚锛屼?#23338;锛?#37922;?#29831;?#37721;风爜
      鏂规硶锛?#28751;?#37825;版嵁鍙?#37812;?#28725;硅薄銆?/p>

      8.3 Change Value to Reference锛?#28751;嗗?#28725;硅薄鏀?#28051;?#23534;?#37922;?#28725;硅薄锛?79

      鍔?#37832;?#38171;?#28051;涓?#32491;?#37832;?#29825;?#28598;?#37929;?#32475;夌殑瀹?#28186;?#38171;屽笇鏈?#37814;?#26473;?#27996;?#37929;?#32475;夌殑瀹?#28186;嬬粺涓涓?#28051;涓?#28725;硅薄锛?#37826;逛究?#31930;涓淇?#37824;规垨鑰?#26473;?#29723;?#37929;?#32475;夋?#23011;旇緝
      鏂规硶锛?#28751;嗗?#28725;硅薄鍙?#37812;?#23534;?#37922;?#28725;硅薄
      鈥?#23534;?#37922;?#28725;硅薄鈥?#28051;?#37413;?#37706;?#28725;硅薄鈥濈殑?#23599;鍒?#38171;?/p>

      • ?#30241;涓?#23534;?#37922;?#28725;硅薄浠?#29723;?#37931;鐜?#28729;?#28051;?#28051;涓?#28725;硅薄锛屼娇鐢?#28725;硅薄?#27537;涓鑷存?#37922;?#37833;?#22955;?#31092;涓?#28051;?#28725;硅薄鏄?#37722;?#37929;哥瓑锛屽嵆(==)
      • 鍊?#28725;硅薄瀹?#37711;?#37922;?#37711;惰嚜?#38889;?#27537;鍊?#37833;?#37929;?#27996;掑尯鍒?#38171;岄渶瑕?#38322;?#37712;?#28051;浜?#37826;规硶鐢?#37833;?#22955;?#31092;涓?#28051;?#28725;硅薄鏄?#37722;?#37929;哥瓑銆?#38171;?#38322;?#37712;equals()鍜宧ashcode()鏂规硶锛?#37711;?#28003;撴?#35268;硶锛?
      • ?#28214;瑕佷娇鐢?#23480;?#37720;?#22959;?#23534;?#37833;?#37714;涘缓瀵硅薄
      • ?#28214;瑕?#37721;?#28051;涓?#28725;硅薄锛堟垨鑰?#37828;嚜?#38889;锛?#28003;?#28051;?#29825;?#38338;?#37904;规潵璁?#38338;?#28729;?#28052;夌殑寮?#37922;?#28725;硅薄锛屽?#30789;薄鐢Dictionary?#22440;鑰匟ashTable鏉?#28103;?#28699;樺?#30789;薄
      • 鍐?#28729;?#28725;硅薄鏄?#26864;?#37711;?#37714;涘缓杩?#37828;?#37716;?#37804;?#37714;涘缓

      8.4 Change Reference to Value锛?#28751;?#23534;?#37922;?#28725;硅薄鏀?#28051;?#37706;?#28725;硅薄锛?83

      鍔?#37832;?#38171;?#23534;?#37922;?#28725;硅薄锛屽緢?#30380;涓?#28051;?#37721;?#37721;?#38171;?#38000;?#28051;?#28051;?#37828;?#32480;悊

      • 寰堝皬锛?#37714;涘缓璁?#28598;?#28052;?#28051;嶄細娑?#38000;?#28598;?#28598;?#37712;呭瓨
      • 涓?#37721;?#37721;?#38171;?#28051;嶉渶瑕?#28598;嶆潅?#27537;绠悊浠爜锛屼篃涓嶉渶瑕?#38000;冭檻鍚屾闂?#26864;?#38171;?#26473;樹細閫?#37812;?#37714;?#37722;?#38338;?#26864;?#37711;?#28003;撴?#35268;硶锛?
      • 妫?#29025;閲?#37835;?#37929;?#37837;?#37828;?#37722;?#37828;?#28051;?#37721;?#37721;樺?#30789;薄?#22440;鑰?#37721;?#28103;?#37824;规垚涓?#37721;?#37721;樺?#30789;薄
        • ?#23047;鐢Remove Setting Method鍙?#37812;?#28051;?#37721;?#37721;樺?#30789;薄
        • 濡?#37835;?#37827;犳硶淇?#37824;规垚涓?#37721;?#37721;樺?#30789;薄锛屽?#36776;?#24807;純閲?#37835;?
      • 閲?#37712;hashCode鍜宔quals()鏂规硶
      • 鍙?#23057;堜娇鐢殑宸?#37720;?#22959;?#23534;?#38171;?#39582;?#28751;嗗?#30789;薄?#27537;鏋?#38315;犲嚱鏁?#29825;?#28051;簆ublic

      8.5 Replace Array with Object锛堜互瀵硅薄鍙?#28000;?#37825;?#32513;?#38171;?86

      鍔?#37832;?#38171;?#28641;?#37835;?#37825;版嵁瀛樺偍?#27537;鍊?#28000;?#29723;?#28051;?#37722;岀殑涓滆銆?br>鏂规硶锛?#28751;?#37825;?#32513;勫彉鎴?#28725;硅薄锛?#37825;?#32513;勭殑?#30241;涓?#37711;冪礌鐢?#28699;楁琛?#32448;?/p>

      8.6 Duplicate Observed Data锛?#28598;?#37714;?#37413;滆鐩戣鏁版嵁鈥?#38171;?89

      鍔?#37832;?#38171;?鏈?#28051;氬姟鏁版嵁缃韩浜GUI鎺?#28000;朵腑锛?#38000;?#28051;?#28051;氬姟鐩?#37711;崇殑鍑?#37825;伴渶瑕?#29825;?#38338;?#26473;?#27996;?#37825;版嵁
      鏂规硶锛?#28751;?#28051;氬姟鏁版嵁澶?#37714;跺埌涓氬姟绫?#28051;?#37510;傚缓绔婳bserver妯?#23534;?#38171;屽?#23678;UI鍜?#28051;氬姟绫荤殑鏁版嵁銆?/p>

      8.7 Change Unidirectional Association to Bidirectional锛?#28751;?#37719;?#37722;?#37711;宠仈鏀?#28051;?#37721;屽悜鍏宠仈锛?97

      鍔?#37832;?#38171;?#28051;?#28051;?#32491;?#37929;?#27996;?#28052;?#38338;撮兘?#28214;瑕佸鏂圭殑鏁版嵁锛屼?#21976;槸鐩?#27996;?#28052;?#38338;村彧鏈?#28051;鏉?#37719;?#37722;戠殑杩炴帴
      杩?#28051;?#38322;?#37835;勯渶瑕佹坊鍔犳祴璇?#38171;屽洜涓?#37413;?#37721;?#37722;戞寚閽?#37413;?#23536;?#28729;?#37828;?#38315;?#37812;?#23075;?#28052;?#37510;?
      鍏?#28003;撴?#35268;硶锛?/p>

      • 鍦?#29722;?#23534;?#37922;?#32491;?#23075;?#37716;犲?#26945;锛屼繚瀛?#23534;?#37922;?#32491;荤殑鎸?#38333;?#38171;?
      • 鍒?#37826;?#37922;?#37725;?#28051;?#32491;?#37833;?#37818;?#37714;?#37711;宠仈鍏?#32495;?#38171;?
        • 濡?#37835;?#28051;?#38000;呴兘鏄?#23534;?#37922;?#28725;硅薄锛?#28051;?#37711;宠仈鍏?#32495;?#28051;?#37413;?#28051;瀵?#28598;?#37413;濈殑鍏?#32495;?#38171;岄偅涔?#28751;辩敱鈥?#37815;?#37832;夊崟涓寮?#37922;?#37413;濈殑瀵硅薄浣?#28051;烘帶鍒?#38000;?#38171;?
        • 濡?#37835;A瀵硅薄鏄疊瀵硅薄?#27537;閮?#28000;?#38171;屽垯鐢B瀵硅薄璐?#29840;?#37818;?#37714;?#37711;?#32495;?#38171;?
        • 濡?#37835;?#28051;?#38000;呴兘鏄?#23534;?#37922;?#28725;硅薄锛?#28051;?#37711;宠仈鍏?#32495;?#28051;?#37413;?#28598;?#28725;?#28598;?#37413;濈殑鍏?#32495;?#38171;岄偅涔堥殢鎰忕瀹?#28051;涓?#28725;硅薄浣?#28051;烘帶鍒?#38000;?#37510;?
      • 鍦?#29722;?#37818;?#32468;缓绔嬭?#21613;姪鍑?#37825;?#38171;屽?#34249;?#23942;竻鏅?#37734;版弿杩?#37711;?#37922;?#38315;?#38171;?
        • 濡?#37835;?#28103;?#37824;瑰嚱鏁?#37734;?#37818;?#37714;?#32468;?#38171;屽垯鐢?#37711;?#29840;?#29840;?#37831;存柊鍙?#37722;戞寚閽?#38171;?
        • 濡?#37835;?#28103;?#37824;瑰嚱鏁?#37734;?#29722;?#37818;?#37714;?#32468;?#38171;屽垯鍦?#37818;?#37714;?#32468;缓绔?#28051;涓?#28103;?#37824;?#37721;嶅皠鎸?#38333;堢殑鍑?#37825;?#38171;?#37922;变慨鏀瑰嚱鏁拌皟鐢?#37711;朵慨鏀?#37721;?#37722;戞寚閽?#37510;?
        • 涓?#38000;?#37828;?#28051;瀵?#28598;?#37711;?#32495;?#38171;?#37832;夊崟涓寮?#37922;?#37813;?#37815;?#37818;?#37714;?#37711;宠仈鍏?#32495;?#29840;?#28000;?

      8.8 Change Bidirectional Association to Unidirectional锛?#28751;?#37721;屽悜鍏宠仈鏀?#28051;?#37719;?#37722;?#37711;宠仈锛?00

      鍔?#37832;?#38171;?#28051;?#28051;?#32491;?#37832;夊?#23677;悜鍏宠仈锛屼?#21976;槸涓涓?#32491;?#28051;?#37712;嶉渶瑕?#37721;?#28051;涓?#32491;荤殑鐗规?
      鍘熷洜锛?/p>

      • 鍙屽悜鍏宠仈鍙兘閫?#37812;愬兊灏?#28725;硅薄锛?#28051;嶈兘琚?#23059;呴櫎閲婃?#24807;?#21613;瓨銆?
      • ?#23047;涓?#28051;?#32491;?#28699;?#37734;?#38000;?#37722;?#37711;?#32495;?#38171;?#28051;涓?#32491;荤殑鍙樺?#26662;細瀵?#38007;村彟涓绫荤殑鍙樺寲銆?#37826;规硶锛氬幓?#27342;鍙屽悜鍏宠仈
        鍥伴毦锛氭?#29025;鍙?#29723;屾?

      8.9 Replace Magic Number with Symbolic Constant锛堜互瀛楅潰?#29238;閲忓彇浠?#27012;旀硶鏁?#38171;?04

      鍔?#37832;?#38171;?#37832;?#28051;涓?#28699;楅潰?#29238;閲?#38171;堥櫎浜?鍜?涔?#28598;?#38171;?
      鏂规硶锛?#37714;涘缓?#29238;閲?#29863;嬪间互璇?#28699;楅潰?#29238;閲?#38171;?#32513;?#27996;堝?#34249;悕銆?/p>

      8.10 Encapsulate Field锛?#28751;佽?#21613;?#26945;锛?06

      鍔?#37832;?#38171;?#28051;涓?#32491;?#37832;塸ublic瀛楁
      灏?#28729;冨?#29256;槑涓簆rivate锛?#39582;舵彁渚?#37929;?#25652;旂殑璁?#38338;?#37713;?#37825;?/p>

      8.11 Encapsulate Collection锛?#28751;佽?#21620;泦鍚?#38171;?08

      鍔?#37832;?#38171;?#32491;?#28051;娇鐢?#38342;?#37722;?#38171;屼?#21976;槸闆?#37722;?#28051;嶈兘?#24385;渚?#32513;?#37922;?#37812;?#37929;存帴鎿?#28003;?#38171;?#38000;?#37828;彁渚?#37713;?#37825;版搷浣?#38342;?#37722;?#38171;岄檷浣?#37922;?#37812;?#28051;庨泦鍚?#28052;?#38338;寸殑鑰?#37722;?#25652;?
      鏂规硶锛氭彁渚?#37713;?#37825;?#26473;斿洖闆?#37722;堢殑鍙?#29831;诲壇鏈?#38171;?#39582;舵彁渚涘?#28850;?#29362;?#23677;垹?#27342;闆?#37722;?#37711;冪?#29365;殑鍑?#37825;?
      鍏?#28003;撴?#35268;硶锛?/p>

      • Java2锛?#28751;佽?#21296;et
      • Java1.1锛?#28751;佽?#21299;ector
      • 灏佽鏁?#32513;?

      8.12 Replace Record with Data Class锛堜互鏁版嵁绫?#37721;?#28000;?#29825;板綍锛?17

      鍔?#37832;?#38171;氶潰瀵规棫绋?#25652;?#28051;璕ecord鏁版嵁缁撴瀯锛屾柊?#32531;绫?#37721;?#28000;?#28729;?br>鏂规硶锛?#28051;?#29831;?#29825;板綍鍒涘缓涓涓?#37413;?#37725;?#37413;?#37825;版嵁瀵硅薄銆?/p>

      Type Code锛?#32491;诲?#23340;爜锛?/h3>

      ?#29238;瑙?#27996;?#26473;囧幓?#27537;C璇?#29815;缂?#32459;?#28051;?#38171;屽洜涓?#23052;?#37832;?#37835;?#28051;?#38171;屾墍?#20114;閲?#37922;?#32491;诲?#23340;爜?#27537;鏂?#23534;?#37837;囨敞銆?#26473;?#28051;?#38322;?#37835;?#38316;囧埌?#27537;鏈轰細姣旇緝?#30380;

      8.13 Replace Type Code with Class锛堜互绫?#37721;?#28000;?#32491;诲?#23340;爜锛?18

      鍔?#37832;?#38171;?#32491;?#28051;殑鏁?#37706;?#32491;诲?#23340;爜涓嶅奖鍝?#32491;荤殑琛?#28051;?br>鏂规硶锛氫互涓涓柊绫?#37831;?#28000;?#32491;诲?#23340;爜

      8.14 Replace Type Code with Subclasses锛堜互?#29913;绫?#37721;?#28000;?#32491;诲?#23340;爜锛?23

      鍔?#37832;?#38171;?#37832;?#28051;涓?#28051;?#37721;?#37721;樼殑绫诲?#23340;爜涓斿奖鍝?#32491;荤殑琛?#28051;?br>鏍囧織锛歴witch?#22440;鑰卛f-then-else绫荤殑鏉?#28000;?#29723;?#26440;惧紡锛?#26473;?#28051;?#38322;?#37835;?#37828;疪eplace Conditional with Polymorphism?#27537;鍑?#28598;?#23480;?#37711;?
      鏂规硶锛氫互?#29913;绫?#37721;?#28000;?#26473;?#28051;?#32491;诲?#23340;爜

      8.15 Replace Type Code with State/Strategy锛堜互State/Strategy鍙?#28000;?#32491;诲?#23340;爜锛?27

      鍔?#37832;?#38171;?#37832;?#28051;涓?#32491;诲?#23340;爜涓斿奖鍝?#32491;荤殑琛?#28051;?#38171;屼?#21976;槸鏃犳硶閫?#26473;?#32513;?#37813;?#23057;堥櫎锛?#32491;诲?#23340;爜鍙?#37721;樺寲锛?br>鏂规硶锛氫互鐘舵佸?#30789;薄鍙?#28000;?#37510;?/p>

      8.16 Replace Subclass with Fields锛堜互瀛楁鍙?#28000;瓙绫?#38171;?32

      鍔?#37832;?#38171;?#37722;?#28051;瓙绫诲敮涓?#23599;鍒?#37721;?#37734;?#37413;?#26473;斿?#28850;父閲忕殑鏁版嵁鈥濈殑鍑?#37825;?#28051;?br>鏂规硶锛?#28103;?#37824;?#26473;?#27996;?#37713;?#37825;颁?#22446;?#20903;滑杩斿?#28854;秴绫荤殑?#28999;涓?#38171;堟柊澧?#38171;夊?#26945;锛岀劧鍚庨姣佸瓙绫?#37510;?/p>

      绗?绔?绠鍖?#37833;?#28000;?#29723;?#26440;惧紡 237

      鏉?#28000;堕昏緫闈炲父澶嶆潅锛屼篃闈炲父?#27622;?#20114;?#24714;瑙?#38171;岄?#26473;?#38322;?#37835;勫皢澶嶆潅?#27537;閫昏?#25117;睍鐜?#28051;?#32480;鍗曠殑閫昏?#25117;潡銆?br>鏈?#27996;?#38322;?#37835;?#37826;规硶?#28229;璧锋潵闈炲父绠鍗?#38171;屽洜涓?#38322;?#37835;?#37832;閲?#29781;佺殑鎬濇兂涓?#37828;?#37826;规硶鏈夊绮惧锛?#38000;?#37828;?#28028;?#26440;?#27996;?#28051;涓皬姝揩璧扮殑?#24714;?#24247;銆?#28751;?#37828;?#28051;娆?#37721;?#28729;屾垚涓涓皬閲?#37835;?#38171;岀劧鍚庢祴璇曠淇?#23052;?#37832;夐敊璇?#37510;?#37906;?#37722;?#38171;屽啀杩?#29723;?#28051;?#28051;涓皬閲?#37835;勫?#23678;祴璇?#37510;?#28000;?#38000;?#37825;?#28051;?#28598;?#38322;?#37835;?#38315;?#26473;囧涓?#32480;鍗曠殑?#30380;閲?#37835;勫?#23678;垚锛岄伩鍏?#28598;?#38322;?#37835;勫嚭?#25930;鍚庨渶瑕?#37711;?#38318;?#37733;炴?#27697;殑闂?#26864;?#37510;?/p>

      9.1 Decompose Conditional锛?#37714;嗚鏉?#28000;?#29723;?#26440;惧紡锛?38

      鍔?#37832;?#38171;歩f-then-else璇?#37721;?#38171;?#28051;?#37722;屽?#21976;敮?#20187;涓?#37722;?#27996;?#37716;?#37832;烘垚澶?#37736;嬪嚱鏁?#38171;?#37832;韩灏遍毦?#20114;闃?#29831;?#38171;屽挨鍏?#37734;?#29999;?#37832;夊?#23942;潅鏉?#28000;剁殑閫昏緫涓?#37510;?#37826;规硶锛?/p>

      • 灏唅f璇?#37721;彁鐐?#28051;?#37713;?#37825;?
      • 灏唗hen鍜宔lse娈佃?#33445;彁鐐?#28051;?#37713;?#37825;?
      • 瀵?#27996;庡瓨鍦?#23443;屽?#26947;殑鏉?#28000;堕昏緫锛?#37711;?#37714;?#37826;?#37828;?#37722;?#37721;互鐢Replace Nested Conditional with Guard Clauses锛堜互鍗?#29831;?#37721;?#37721;?#28000;?#23443;屽鏉?#28000;?#29723;?#26440;惧紡锛夋?#22565;櫎銆?#28051;?#29723;屽啀鍒嗚?#30241;涓?#37833;?#28000;?

      9.2 Consolidate Conditional Expression锛?#37722;?#39582;舵潯浠?#29723;?#26440;惧紡锛?40

      鍔?#37832;?#38171;?#37832;?#28051;绯?#37714;?#37833;?#28000;?#37714;?#37826;兘鏈嶅姟浜?#37711;?#37722;岀殑鐩?#37837;?
      鏂规硶锛?#28751;?#26473;?#27996;涙潯浠?#37714;?#37826;?#37722;?#39582;朵负鍚?#28051;涓?#29723;?#26440;惧紡锛屽啀灏?#26473;?#28051;?#29723;?#26440;惧紡?#24385;鐐?#28051;虹嫭绔嬪嚱鏁?
      鍘熷洜锛?/p>

      • 鍙?#37828;?#28051;娆?#37833;?#28000;舵?#29025;锛屽彧鏄?#28699;?#37734;?#28598;?#28051;?#39582;?#37714;?#37833;?#28000;堕渶瑕佹?#29025;鑰屽凡
      • 涓篍xtract Method锛堟彁鐐煎嚱鏁?#38171;夊仛鍑?#28598;?#38171;岄?#26473;囧嚱鏁?#37722;嶅?#23108;煡鈥?#28051;轰粈涔?#26473;?#28052;堝仛鈥?

      9.3 Consolidate Duplicate Conditional Fragments锛?#37722;?#39582;?#38322;?#28598;嶇殑鏉?#28000;剁墖娈?#38171;?43

      鍔?#37832;?#38171;?#37734;?#37833;?#28000;?#29723;?#26440;惧?#24533;殑涓?#37722;屽?#21976;敮涓?#28699;?#37734;?#37929;?#37722;岀殑浠爜
      鏂规硶锛?#28751;?#26473;?#27996;?#38322;?#28598;?#28000;爜?#24777;绉?#37714;版潯浠?#29723;?#26440;惧紡涔?#28598;?#38171;屽?#27699;?#23676;唬?#29212;杩?#37721;互鍐嶆彁鐐?#28051;虹嫭绔嬪嚱鏁?#37510;?br>渚嬪锛?#35120;try鍜宑atch鎵?#29723;?#37929;?#37722;屼唬?#29212;锛屽彲?#20114;灏嗕唬?#29212;绉诲埌final?#23599;娈?#37510;?/p>

      9.4 Remove Control Flag锛堢?#23130;櫎鎺?#37714;舵爣璁?#38171;?45

      鍔?#37832;?#38171;?#37734;?#23536;?#37916;?#37813;?#29723;岀殑绋?#25652;忔涓?#38171;屾煇涓?#37721;?#38322;忓畾涔?#28051;?#37714;?#37826;?#37833;?#28000;朵腑?#27537;鎺?#37714;舵爣璁?#38171;control flag锛?#38171;屽?#28850;姞浜嗕唬?#29212;?#24714;瑙殑澶嶆潅搴?br>鏂规硶锛?/p>

      • ?#20114;break?#22440;鑰卌ontinue浠?#37831;?#38171;?
      • 涔?#37721;互閫?#26473;囧嚱鏁拌皟鐢?#37724;宺eturn璇?#37721;?#37833;?#28729;?#37916;?#37510;?

      9.5 Replace Nested Conditional with Guard Clauses锛堜互鍗?#29831;?#37721;?#37721;?#28000;?#23443;屽鏉?#28000;?#29723;?#26440;惧紡锛?50

      鍗?#29831;?#37721;?#38171;?#28641;?#37835;滄煇涓?#37833;?#28000;舵鍏?#32515;?#29785;?#38171;屽氨搴?#29831;?#37719;曠嫭妫?#29025;璇?#37833;?#28000;?#38171;?#39582;?#37734;?#29831;?#37833;?#28000;朵?#34425;?#29112;椂绔?#37714;讳?#24225;嚱鏁?#28051;?#26473;斿洖锛?#26473;?#37837;风殑鍗曠嫭妫?#29025;琚?#32457;?#28051;?#37413;?#37719;?#29831;?#37721;?#37413;?#38171;坓uard clauses锛?
      鍔?#37832;?#38171;?#37713;?#37825;?#28051;殑鏉?#28000;堕昏?#25116;娇浜洪毦?#20114;鐪嬫竻姝?#32429;殑鎵?#29723;?#29882;?#23536;?#37510;?br>鏂规硶锛氫娇鐢?#37719;?#29831;?#37721;?#29723;?#37916;版墍鏈夌殑鐗规?#23107;?#21613;喌

      9.6 Replace Conditional with Polymorphism锛堜互澶?#37804;?#37721;?#28000;?#37833;?#28000;?#29723;?#26440;惧紡锛?55

      鍔?#37832;?#38171;?#28699;?#37734;?#37833;?#28000;?#29723;?#26440;惧紡鏍规嵁瀵硅薄?#27537;绫诲瀷涓?#37722;岄?#37815;?#28051;?#37722;岀殑琛?#28051;?
      鏂规硶锛?#28751;嗚杈惧?#24531;?#21976;敮鏀?#26473;?#28051;?#37722;屽瓙绫?#38171;岀劧鍚?#38322;?#37712;?#37826;规硶锛屽皢鍘熷?#23338;嚱鏁版彁鐐?#28051;?#37814;?#29854;?#37713;?#37825;?#37510;?/p>

      9.7 Introduce Null Object锛?#23534;?#37711;Null瀵硅薄锛?60

      鍔?#37832;?#38171;氶渶瑕?#37712;?#28051;夋?#29025;瀵硅薄鏄?#37722;?#28051;null
      鏂规硶锛?#28751;null鍊?#37831;?#28000;?#28051;null瀵硅薄锛屽鏋?#37720;熷绫?#28051;?#37711;?#29825;?#28103;?#37824;?#37721;互?#23047;鐢Null?#24116;鍙?#37833;?#22955;?#29025;鈥?#28725;硅薄鏄?#37722;?#28051;Null鈥?#37510;?/p>

      9.8 Introduce Assertion锛?#23534;?#37711;?#37826;?#29815;锛?67

      鍔?#37832;?#38171;氭煇娈?#28000;爜?#28214;瑕佸?#22317;搴忕?#33333;?#37828;惧?#24531;?#25292;鏄庢煇绉嶅亣璁?
      鏂规硶锛氫互鏂?#29815;鏄庣琛?#37916;?#26473;?#32457;嶅亣璁?
      鍏?#28003;撴?#35268;硶锛?鏂?#29815;鍦??#24386;?#31479;?#27537;?#26882;鍊欑粺?#31930; 琚?#29882;?#26473;?/p>

      10.1 Rename Method锛堝嚱鏁版敼鍚?#38171;?73

      鍔?#37832;?#38171;?#37713;?#37825;扮殑鍚嶇涓嶈兘璇?#37828;庡嚱鏁扮殑鐢?#38315;?br>鏂规硶锛?#28751;嗘棫鍑?#37825;颁唬?#29212;?#24777;绉?#37714;版柊鍑?#37825;?#38171;屾棫鍑?#37825;拌?#23456;浆鍒版柊鍑?#37825;?#37510;?/p>

      10.2 Add Parameter锛堟坊鍔犲弬鏁?#38171;?75

      鍔?#37832;?#38171;氳璋?#37922;殑鍑?#37825;伴渶瑕佷粠璋?#37922;?#37713;?#37825;?#28051;?#23536;?#37714;版?#26449;?#27697;殑淇?#37805;?
      鏂规硶锛?#28051;?#29722;?#29835;?#37922;殑鍑?#37825;版坊鍔犲弬鏁?br>鎶?#37815;?#38171;?/p>

      • 鐜?#37832;夊弬鏁版槸鍚彁渚涜冻澶熺殑淇?#37805;?#38171;?
      • 杩?#28051;?#37713;?#37825;版槸鍚?#25652;?#29831;?#32457;?#37716;?#37714;版嫢鏈?#29831;?#28103;?#37805;殑瀵硅薄涓?#38171;?
      • 鍔?#37711;柊鍙?#37825;版槸鍚?#37722;?#38315;?#38171;?
      • 濡?#37835;滈渶瑕佺殑鍙?#37825;?#26473;囧锛?#37828;?#37722;渶瑕佷娇鐢Introduce Parameter Object锛?#23534;?#37711;?#37721;?#37825;?#28725;硅薄锛?#38171;?

      10.3 Remove Parameter锛堢?#23130;櫎鍙?#37825;?#38171;?77

      鍔?#37832;?#38171;?#37713;?#37825;?#28051;嶉渶瑕佹煇涓?#37721;?#37825;?#38171;?#28051;嶉渶瑕?#27996;?#28751;辨?#24807;純锛屼繚?#26240;涔熼渶瑕佷?#27194;?#36720;唬浠?#38171;?br>鏂规硶锛?/p>

      • 濡?#37835;?#37828;?#37913;?#32468;嬬殑鍑?#37825;?#38171;?#37929;存帴灏嗚鍙?#37825;扮?#23130;櫎
      • 濡?#37835;?#37828;?#28598;?#37804;佸嚱鏁?#38171;?#28051;嶈兘绉婚櫎锛屽?#21342;?#28850;姞涓涓柊?#27537;娌?#37832;?#26473;?#28051;?#37721;?#37825;扮殑鍑?#37825;?#38171;屼娇璋?#37922;?#38000;呯殑宸?#28003;?#23536;楀埌绠鍖?

      10.4 Separate Query from Modifier锛?#28751;嗘煡璇?#37713;?#37825;?#37724;屼慨鏀瑰嚱鏁?#37714;嗙锛?79

      鍔?#37832;?#38171;氭煇涓?#37713;?#37825;版棦淇?#37824;?#28725;硅薄鐘舵?#38171;屽杩斿洖瀵硅薄鐘舵佸?#37510;?#38171;堜娇璋?#37922;?#38000;?#37815;呭績璇?#37823;?#28003;?#28103;?#37824;?#27996;?#28051;?#25652;?#29831;?#28103;?#37824;圭殑鏁版嵁锛屽?#28850;姞璋?#37922;?#38000;呯殑鎿?#28003;?#29840;?#37815;?#38171;?br>鏈?#29840;?#38171;?#37713;?#37825;?#37716;熻兘绠娲?#37510;?#37828;庣锛屽鏋?#28051;涓?#37713;?#37825;?#37711;?#28598;囧涓?#37716;熻兘锛屽氨鎶?#28729;冧滑鍒嗙鎴?#28598;?#28051;?#37713;?#37825;?#37510;?
      鏂规硶锛氬缓绔?#28051;?#28051;?#28051;?#37722;岀殑鍑?#37825;?#38171;?#37711;朵腑涓涓?#29840;?#29840;煡璇?#38171;屽彟涓涓?#29840;?#29840;?#28103;?#37824;?#37510;?
      鍘?#37714;?#38171;?/p>

      • 浠讳綍涓涓?#37832;?#26473;斿?#28850;肩殑鍑?#37825;伴兘涓?#25652;?#29831;?#37832;夌湅寰楀埌?#27537;鍓?#28003;?#37922;?#37510;?
      • 缂栫爜涓?#28051;?#29781;?#38000;冭?#25120;殑涓?#37828;?#28000;爜?#27537;鏁?#37916;?#38171;?#38000;?#37828;?#28000;爜?#27537;鏄?#29831;?#37804;?#38171;?#37825;?#37916;囧彲?#20114;鍦?#37832;?#37833;?#28051;婄?#36328;殑?#26882;鍊?#37712;嶆?#35268;嵁瀹?#38340;呴渶瑕?#29835;?#37825;?#37510;?#28598;氱绋?#38171;?#28751;嗕慨鏀?#37724;屾煡璇?#37713;?#37825;?#28751;佽鍦?#28051;涓?#37722;屾鍑?#37825;?#28051;?#37714;?#23534;璋?#37922;?#37510;?

      10.5 Parameterize Method锛?#28000;?#37713;?#37825;版惡甯?#37721;?#37825;?#38171;?83

      鍔?#37832;?#38171;?#37713;?#28051;?#37713;?#37825;?#38171;屽仛浜嗙?#35763;?#32937;殑宸?#28003;?#38171;屽彧鏄?#28000;爜涓殑绯?#37825;?#28051;?#37722;?
      鏂规硶锛氬缓绔?#37719;?#28051;鍑?#37825;?#38171;屼互鍙?#37825;颁綔涓?#32495;?#37825;?/p>

      10.6 Replace Parameter with Explicit Methods锛堜互鏄庣鍑?#37825;?#37721;?#28000;?#37721;?#37825;?#38171;?85

      鍔?#37832;?#38171;?#37713;?#37825;颁?#28618;禆浜庡弬鏁?#37706;肩殑涓?#37722;?#38000;?#38322;囧彇涓?#37722;岀殑琛?#28051;?
      鏂规硶锛氶拡瀵?#29831;?#37721;?#37825;扮殑?#30241;涓?#37721;兘鍊?#38171;屽缓绔嬬嫭绔嬪嚱鏁?#37510;?
      瀵规瘮锛?#28051;Parameterize Method锛?#28000;?#37713;?#37825;版惡甯?#37721;?#37825;?#38171;?#37929;?#37721;?#38171;屼?#21976;槸鐩殑?#20824;鏄?#37814;?#28598;嶆潅?#27537;閫昏緫鍒?#37826;?#23057;堥櫎 鐩殑锛氭彁渚涙竻鏅扮殑鍏?#37721;?#37510;?br>濡?#37835;?#37721;?#37825;?#37706;?#28725;瑰嚱鏁拌涓?#35120;?#37725;?#28051;?#28598;?#38171;?#28051;?#25652;?#29831;?#38322;?#37922;?#23005;?#37826;规硶銆?/p>

      10.7 Preserve Whole Object锛?#28103;濇?#20344;?#30789;薄瀹?#37825;?#38171;?88

      鍔?#37832;?#38171;?#28000;庢煇涓?#28725;硅薄鍙?#38011;?#39582;?#28051;?#37706;?#38171;?#37814;婁粬浠?#28003;?#28051;?#37721;?#37825;颁紶缁?#37713;?#37825;?
      鏂规硶锛?#37824;?#28051;?#29835;?#37922;?#37825;?#28051;?#28725;硅薄
      鐩殑锛?#38316;?#37711;?#26473;?#38336;垮弬鏁?#37714;楄
      缂?#38340;?#38171;?#28641;?#37835;滀紶閫掔殑鏄?#37706;?#38171;岄偅涔堝嚱鏁?#37721;?#28186;濊?#26669;偅浜?#37706;?#38171;?#28641;?#37835;滀紶閫掔殑鏄?#28725;硅薄锛屽嚱鏁?#37714;?#28186;濊禆瀵硅薄锛屼細瀵?#38007;磋?#37722;?
      ?#25950;鎰?#38171;?#37832;夋椂鍊?#37713;?#37825;颁娇鐢?#27996;?#23536;?#28598;?#37833;嚜?#28999;涓?#28725;硅薄?#27537;鏁版嵁锛岄偅涔?#25652;?#29831;?#38000;冭?#25116;娇鐢?#38171;圡ove Method锛夊皢杩?#28051;?#37713;?#37825;扮?#35826;埌鍏?#32495;诲瘑鍒囩殑瀵硅薄涓?/p>

      10.8 Replace Parameter with Methods锛堜互鍑?#37825;?#37721;?#28000;?#37721;?#37825;?#38171;?92

      鍔?#37832;?#38171;?#28725;硅薄璋?#37922;煇涓?#37713;?#37825;?#38171;?#39582;?#28751;嗘墍寰?#32513;撴灉浣?#28051;?#37721;?#37825;颁紶閫?#32513;?#37721;?#28051;涓?#37713;?#37825;?#38171;?#38000;屾帴鍙?#29831;?#37721;?#37825;扮殑鍑?#37825;?#37832;韩涔熻兘澶熻皟鐢墠涓涓?#37713;?#37825;?
      鏂规硶锛?#29825;?#37721;?#37825;版帴鍙?#38000;呭幓?#27342;璇?#26916;?#37721;?#37825;?#38171;?#39582;?#37929;存帴璋?#37922;墠涓涓?#37713;?#37825;?/p>

      10.9 Introduce Parameter Object锛?#23534;?#37711;?#37721;?#37825;?#28725;硅薄锛?95

      鍔?#37832;?#38171;?#37832;?#27996;?#37721;?#37825;版?#37828;嚜鐒?#37734;?#37722;屾椂?#22189;鐜?
      鏂规硶锛?#37922;?#28051;涓?#28725;硅薄鎶?#26473;?#27996;?#37721;?#37825;板?#21616;?#21616;?#38155;潵杩?#29723;屼紶閫?br>鐩殑锛?/p>

      • 缂?#37933;?#37721;?#37825;?#37714;楄闀垮害锛?
      • 鍑?#37825;?#37711;?#37832;?#28051;鑷存?#38171;岄檷浣庣悊瑙?#37724;屼慨鏀逛唬?#29212;?#27537;闅惧害

      10.10 Remove Setting Method锛堢?#23130;櫎璁惧煎嚱鏁?#38171;?00

      鍔?#37832;?#38171;?#32491;荤殑?#28999;涓?#28699;楁搴?#29831;?#28725;硅薄鍒涘?#34425;殑?#26882;鍊?#29722;?#29825;?#32515;?#38171;岀劧鍚?#28051;?#37712;嶆敼鍙?
      鏂规硶锛氬幓鎺?#29831;?#28699;楁?#30005;殑璁?#32515;?#37713;?#37825;?/p>

      • 濡?#37835;?#28725;?#37721;?#37825;扮殑杩?#32480;?#23536;?#32480;鍗?#38171;?#38000;?#28051;?#37721;?#37832;?#28051;涓?#37835;?#38315;犲嚱鏁?#38171;屽氨鍙互鐩存帴鍦?#37835;?#38315;犲嚱鏁?#28051;?#37714;?#28654;嬪寲銆?
      • 濡?#37835;?#28103;?#37824;?#28598;嶆潅锛屾垨鑰?#37832;夊涓?#37713;?#37825;拌瘯鍥炬敼鍙?#26473;?#28051;?#28699;楁锛岄偅涔?#28751;遍渶瑕佹彁渚?#28051;涓?#37913;?#32468;嬪嚱鏁?#38171;?#39582;剁粰浜堢嫭绔嬪嚱鏁?#28051;涓竻妤氳杈?#37922;?#38315;旂殑鍚嶅瓧
      • 濡?#37835;?#37828;瓙绫?#29999;?#37832;?#28103;?#37824;硅秴绫荤殑瀛楁
        • 閭?#28052;?#37832;濂?#37828;娇鐢?#29906;?#32491;荤殑鏋?#38315;犲櫒瀹?#37916;版敼鍙?#38171;?
        • ?#22440;鑰?#38315;?#26473;?#37815;?#37832;夎兘澶熸竻妤氳杈?#37922;?#38315;旂殑鍚嶅瓧?#27537;鍑?#37825;版潵瀹?#37916;?#37510;?
      • 濡?#37835;?#28103;?#37824;?#38342;?#37722;堝?#26945;锛?#29831;蜂娇鐢Encapsulate Collection锛?08锛夊疄鐜?#37510;?

      10.11 Hide Method锛堥殣钘忓嚱鏁?#38171;?03

      鍔?#37832;?#38171;?#37832;?#28051;涓?#37713;?#37825;?#38171;屼粠鏉?#23052;?#37832;夎浠讳?#26336;被璋?#37922;?br>鏂规硶锛?#28751;嗚鍑?#37825;?#29825;?#28051;簆rivate
      琛?#37711;?#38171;?#37713;?#37825;?#37721;?#29785;佸害涓?#28598;?#38171;屽湪缂?#29831;戠殑?#26882;鍊?#28751;?#37721;互鍙戠幇锛?#38000;屽嚱鏁?#26473;?#29785;佸害杩?#26946;?#38171;屽?#27411;渶瑕?#38315;?#26473;?#28051;浜?#23480;?#37711;?#38171;Lint锛夋潵杈呭姪妫?#29025;銆?/p>

      10.12 Replace Constructor with Factory Method锛堜互宸?#37720;傚嚱鏁?#37721;?#28000;?#37835;?#38315;犲嚱鏁?#38171;?04

      鍔?#37832;?#38171;?#37714;涘缓瀵硅薄鏃朵笉浠?#28000;?#37828;仛绠鍗曠殑鏋勫缓鍔?#28003;?#37826;规硶锛?#28751;嗘瀯閫犲嚱鏁版浛鎹?#28051;?#23480;?#37720;?#22959;?#23534;忚寖渚?#38171;?/p>

      • 鏍规嵁鏁?#37825;?#38171;?#28729;?#38340;?#37828;?#32491;诲?#23340;爜锛夊?#28056;缓瀵硅薄锛?
      • 鏍规嵁瀛?#32471;?#28051;?#37714;涘缓?#29913;绫?#28725;硅薄锛?
      • ?#20114;鍑?#37825;?#37714;涘缓?#29913;绫?#38171;?

      10.13 Encapsulate Downcast锛?#28751;佽鍚?#28051;?#26462;瀷锛?08

      鍔?#37832;?#38171;氭煇涓?#37713;?#37825;?#26473;斿?#28853;殑瀵硅薄锛岄渶瑕?#37922;卞嚱鏁拌皟鐢?#38000;?#37813;?#29723;屽悜涓?#26462;瀷锛downcast锛?br>鏂规硶锛?#28751;?#37722;?#28051;?#26462;?#37736;嬬?#35826;埌鍑?#37825;?#28051;?/p>

      10.14 Replace Error Code with Exception锛堜互寮傚父鍙?#28000;敊璇爜锛?10

      鍔?#37832;?#38171;氭煇涓?#37713;?#37825;?#26473;斿洖涓涓?#37911;?#28729;氱殑浠爜锛岃绀烘煇涓敊璇殑鎯呭喌
      鏂规硶锛?#37721;?#23057;堥偅涓?#28000;爜鍒?#37826;?#38171;屾?#22317;敤鎶涘嚭寮傚父
      ?#23510;渚?#38171;?/p>

      • 闈?#37721;?#37818;?#23534;傚父锛氫娇鐢?#28729;?#37719;?#29831;?#37721;?#22955;?#29025;杩?#28051;?#23534;傚父鎯呭喌锛?
      • 鍙?#37818;?#23534;傚父锛氶渶瑕佷慨鏀圭殑璋?#37922;?#38000;呭嚱鏁?#37724;岃璋?#37922;?#38000;呭嚱鏁?#38171;屾楠?#28598;?#28598;?#38171;屽鏄撳嚭?#25930;銆?#37721;互鍏?#37714;涘缓涓涓?#28051;存椂?#27537;涓?#38338;村嚱鏁?#38171;屼繚?#26240;鍘熷嚱鏁?#38171;屼娇鎵鏈夌殑璋?#37922;兘鏀?#28051;烘柊鍑?#37825;?#37722;?#38171;屽垹?#27342;鍘熷嚱鏁?#38171;屽啀淇?#37824;规柊鍑?#37825;?#37722;嶇锛屽嵆鍙?#37510;?

      10.15 Replace Exception with Test锛堜互?#31092;璇?#37721;?#28000;?#23534;傚父锛?15

      鍔?#37832;?#38171;?#37832;?#29831;?#37922;辫皟鐢?#38000;呰嚜琛屾?#29025;?#27537;鏉?#28000;?#38171;?#37922;辫璋?#37922;?#38000;?#37814;涘嚭浜?#28051;涓?#37721;?#37818;?#23534;傚父銆?
      鏂规硶锛?#28103;?#37824;硅皟鐢?#38000;?#38171;屼?#22446;畠鍦?#29835;?#37922;?#37713;?#37825;颁?#23338;墠?#20187;妫?#29025;銆?
      琛?#37711;?#38171;?#23534;傚父灏?#25652;?#29831;?#37824;?#37734;?#37721;兘鍙戠敓寮傚父?#27537;鍦版柟?#23047;鐢?#37510;?#37719;?#37721;互棰勬祴?#27537;锛屽彲?#20114;閫?#26473;囨?#29025;閬?#37711;嶇殑锛岄偅灏?#37828;敊璇?#38171;?#28051;?#29831;?#37721;戠敓锛?#28051;嶈兘棰勬祴?#27537;锛屾棤?#30838;閫?#26473;囨?#29025;閬?#37711;嶇殑锛岄偅灏?#37828;?#23534;傚父銆?#28186;嬪锛氳̎鎴?#28003;欓?#28614;皬浜庡彇閽?#37825;?#37929;?#38171;?#37922;宠鍙栭挶杩?#28051;?#28751;?#37828;敊璇?#38171;?#29840;?#37812;?#28003;欓澶?#27996;庡彇閽?#37825;?#37929;?#38171;屽彇涓嶅嚭閽辨潵灏?#37828;?#23534;傚父銆?/p>

      绗?1绔?澶勭悊姒?#37815;?#37711;?#32495;?319

      姒?#37815;?#37711;?#32495;?#38171;坓eneralization锛屽嵆缁?#37813;?#37711;?#32495;?#37510;?#23049;?#37718;?#37711;?#32495;?#38171;?/p>

      11.1 Pull Up Field锛堝?#26945;涓婄锛?20

      鍔?#37832;?#38171;?#28051;?#28051;瓙绫?#37815;?#37832;?#37929;?#37722;岀殑瀛楁
      鏂规硶锛?/p>

      • 灏嗚瀛楁绉?#37716;埌瓒?#32491;?#38171;屽幓?#27342;閲?#28598;?#37825;版嵁澹版槑锛?
      • 灏嗕娇鐢?#29831;?#28699;楁?#30005;殑琛?#28051;烘惉绉诲埌瓒?#32491;?#38171;屽幓?#27342;鍏?#27996;?#26473;?#28051;?#28699;楁?#30005;殑閲?#28598;?#29723;?#28051;?#37510;?
      • 鑰冭?#25117;?#30789;秴绫荤殑璇?#28699;楁?#20856;娇鐢Self Encapsulate Field锛?71锛?

      11.2 Pull Up Method锛堝嚱鏁?#28051;婄锛?22

      鍔?#37832;?#38171;?#37832;?#27996;?#37713;?#37825;?#38171;屽湪鍚?#28051;瓙绫?#27996;?#37922;?#37929;?#37722;岀殑缁撴灉銆?br>鏂规硶锛?/p>

      • 灏嗚鍑?#37825;扮鍔埌瓒?#32491;?
      • 濡?#37835;滆?#24385;鍗囩殑鍑?#37825;?#23534;?#37922;?#27996;嗗瓙绫?#28051;殑鍑?#37825;?
        • 濡?#37835;?#37721;互灏?#23534;?#37922;?#37713;?#37825;版彁鍗?#38171;屽氨涓璧锋彁鍗?
        • 濡?#37835;?#28051;?#37721;互灏?#23534;?#37922;?#37713;?#37825;版彁鍗?#38171;屽彲?#20114;鍦?#29906;?#32491;?#38322;岄潰閭?#28051;?#37814;?#29854;?#37713;?#37825;?

      11.3 Pull Up Constructor Body锛?#37835;?#38315;犲嚱鏁?#37832;?#28003;?#28051;婄锛?25

      鍔?#37832;?#38171;?#28003;犲湪鍚?#28051;瓙绫?#37815;?#37832;?#28051;浜?#37835;?#38315;犲嚱鏁?#38171;屽?#20903;滑?#27537;鏈?#37734;?#37713;?#28052;庡畬鍏?#28051;鑷?br>鏂规硶锛?#37734;?#29906;?#32491;绘柊?#32531;涓涓?#37835;?#38315;犲嚱鏁?#38171;?#39582;?#37734;瓙绫?#37835;?#38315;犲嚱鏁?#28051;?#29835;?#37922;?#28729;?#37510;?
      鍏?#28003;撴?#35268;硶锛?/p>

      • 灏?#37711;?#37722;屼唬?#29212;鏀?#37734;瓙绫?#37835;?#38315;犲嚱鏁拌?#23792;澶?#38171;岀劧鍚庡啀澶?#37714;跺埌瓒?#32491;?#37835;?#38315;犲嚱鏁?#28051;?#37510;?
      • 灏嗗瓙绫?#37835;?#38315;犲嚱鏁?#28051;?#37711;?#37722;屼唬?#29212;鍒犻櫎锛屾?#22317;敤璋?#37922;柊寤虹殑瓒?#32491;?#37835;?#38315;犲嚱鏁?#37510;?

      11.4 Push Down Method锛堝嚱鏁?#28051;嬬锛?28

      鍔?#37832;?#38171;氳秴绫?#28051;殑?#28999;涓?#37713;?#37825;?#37721;?#28051;?#38318;?#37714;嗚岄潪鍏?#38318;瓙绫?#37832;?#37711;?br>鏂规硶锛?#28751;?#26473;?#28051;?#37713;?#37825;扮?#35826;埌鐩?#37711;崇殑?#29913;绫诲幓銆?/p>

      11.5 Push Down Field锛堝?#26945;涓嬬锛?29

      鍔?#37832;?#38171;氳秴绫?#28051;殑?#28999;涓?#28699;楁鍙?#29722;?#38318;?#37714;嗚岄潪鍏?#38318;瓙绫讳娇鐢?br>鏂规硶锛?#28751;?#26473;?#28051;?#28699;楁绉诲埌?#28214;瑕?#28729;冪殑閭?#27996;涘瓙绫诲幓銆?/p>

      11.6 Extract Subclass锛堟彁鐐煎瓙绫?#38171;?30

      鍔?#37832;?#38171;?#32491;?#28051;殑?#28999;浜?#37911;规?#37721;?#29722;?#38318;?#37714;?#28729;?#28186;?#37922;埌銆?br>鏂规硶锛氭柊?#32531;涓涓瓙绫?#38171;屽皢涓婇潰鎵璇寸殑閭?#28051;閮?#37714;嗙?#35268;?#32457;诲埌?#29913;绫?#28051;?#37510;?
      鍏?#28003;撴?#21613;喌锛?/p>

      • 骞朵笉鏄嚭鐜?#32491;诲?#23340;爜灏?#29723;?#32448;洪渶瑕?#37922;埌?#29913;绫?#38171;屽彲?#20114;鍦?#28654;?#37813;樺拰缁?#37813;?#28052;?#38338;村仛閫?#37815;?#37510;?
      • 涓哄瓙绫绘柊?#32531;鏋?#38315;犲嚱鏁?#38171;?
        • ?#29913;绫?#37835;?#38315;犲嚱鏁?#28051;?#29906;?#32491;?#37835;?#38315;犲嚱鏁版嫢鏈?#37929;?#37722;岀殑鍙?#37825;?#37714;楄锛?#39582;朵笖鐩存帴璋?#37922;?#29906;?#32491;?#37835;?#38315;犲嚱鏁?
        • 濡?#37835;滈渶瑕侀殣钘忓瓙绫?#38171;屽彲?#23047;鐢Replace Constructor with Factory Method锛堜互宸?#37720;傚嚱鏁?#37721;?#28000;?#37835;?#38315;犲嚱鏁?#38171;?
      • 鎵惧嚭瓒?#32491;?#29835;?#37922;?#37904;?
        • 濡?#37835;滆秴绫?#37835;?#38315;犲嚱鏁?#28051;庡瓙绫?#28051;?#37722;?#38171;岄?#26473;rename method鏂规硶鍙互瑙?#37712;?#37510;?
        • 濡?#37835;?#28051;嶉渶瑕?#29906;?#32491;?#28729;?#28186;?#38171;屽彲?#20114;灏嗚秴绫诲?#29256;槑涓?#37814;?#29854;?#32491;?#37510;?
      • 閫?#28051;?#23047;鐢?#37713;?#37825;?#28051;嬬鍜屽?#26945;涓嬬灏嗘簮绫荤殑鐗规?#32457;?#37716;埌?#29913;绫?#37510;?

      11.7 Extract Superclass锛堟彁鐐?#29906;?#32491;?#38171;?36

      鍔?#37832;?#38171;?#28051;?#28051;?#32491;?#37832;?#37929;?#28028;?#37911;规?#37510;?
      鏂规硶锛?#28051;?#28051;?#28051;?#32491;诲缓绔?#28051;涓?#29906;?#32491;?#38171;屽皢鐩?#37722;岀?#35268;?#32457;?#38007;宠秴绫?#37510;?
      琛?#37711;?#38171;欵xtract Class锛孍xtract Subclass锛孍xtract Superclass瀵规?#26047;涔?#37510;?/p>

      11.8 Extract Interface锛堟彁鐐兼帴鍙?#38171;?41

      鍔?#37832;?#38171;?#28598;?#28051;?#37922;?#37812;?#37721;娇鐢?#32491;绘帴鍙?#28051;殑鍚?#28051;?#29913;闆?#38171;屾垨鑰?#28051;?#28051;?#32491;荤殑?#24116;鍙?#37832;?#38318;?#37714;?#37929;?#37722;?#37510;?
      鏂规硶锛?#28751;?#37929;?#37722;屽瓙闆嗘彁鐐煎埌鐙?#32468;嬬殑?#24116;鍙?#28051;?#37510;?
      ?#23599;鍒?#38171;氭彁鐐?#29906;?#32491;?#37828;彁鐐?#37711;?#37722;屼唬?#29212;锛屾彁鐐兼帴鍙椂?#24385;鐐?#37711;?#37722;屾帴鍙?#37510;?br>鍏?#28003;?#37716;?#37832;?#38171;?#28641;?#37835;滄煇涓?#32491;?#37734;?#28051;?#37722;?#37916;?#28583;?#28051;?#37813;?#23125;?#37812;?#37906;朵笉鍚岀殑瑙掕锛屼娇鐢帴鍙?#28751;?#37828;?#28051;?#28610;?#28051;?#37808;?#37510;傛帴鍙?#26473;樿兘甯?#37716;?#32491;婚殣钘?#28051;浜?#28725;?#28598;栫殑鍑?#37825;版帴鍙?#37510;?/p>

      11.9 Collapse Hierarchy锛?#37814;?#37721;?#32513;?#37813;?#28003;?#32495;?#38171;?44

      鍔?#37832;?#38171;氳秴绫?#37724;屽瓙绫?#28052;?#38338;村尯鍒?#28051;?#28598;?#37510;?
      鏂规硶锛?#28751;?#28729;冧滑鍚?#28051;?#28051;浣?#37510;?/p>

      11.10 Form TemPlate Method锛堝閫?#22959;?#37833;垮嚱鏁?#38171;?44

      鍔?#37832;?#38171;?#28003;?#37832;?#28051;浜涘瓙绫?#38171;?#37711;朵腑鐩?#25652;旂殑鍑?#37825;颁互鐩?#37722;?#26916;?#25652;?#37813;?#29723;?#32491;讳?#32937;殑鎿?#28003;?#38171;屼絾鍚?#28051;?#37823;?#28003;滅殑缁?#38010;?#37832;夋墍涓?#37722;?#37510;?br>鏂规硶锛?#28751;?#26473;?#27996;涘皬鎿?#28003;?#37714;?#37714;?#37824;?#26473;?#37913;?#32468;嬪嚱鏁?#28051;?#38171;?#39582;朵?#28615;寔瀹冧滑?#20824;鏈?#37929;?#37722;岀殑绛惧悕锛?#27996;?#37828;?#37720;熷嚱鏁颁篃鍙?#23536;?#37929;?#37722;?#27996;?#37510;?#37906;?#37722;庡皢鍘熷嚱鏁?#28051;婄鑷宠秴绫?#38171;?#26473;?#37922;?#28598;?#37804;佹潵閬?#37711;?#38322;?#28598;?#28000;爜銆?#26473;?#37837;风殑鍘熷嚱鏁?#28751;?#37828;疶emplate Method銆?
      鍘熷洜锛氳?#30028;?#26421;娇鐢?#27996;嗙户鎵?#38171;屼?#21976;槸鍑?#37825;?#38322;?#28598;?#25652;?#28751;?#38322;?#38316;?#37711;?#37510;?/p>

      11.11 Replace inherited with Delegation锛堜互濮?#37813;?#37721;?#28000;?#32513;?#37813;?#38171;?52

      鍔?#37832;?#38171;氭煇涓瓙绫?#37721;娇鐢?#29906;?#32491;绘帴鍙?#28051;?#28051;閮?#37714;?#38171;屾垨鏄?#37837;?#37832;?#28051;嶉渶瑕?#32513;?#37813;?#38000;屾潵?#27537;鏁版嵁鏂规硶锛?#37734;瓙绫?#28051;柊?#32531;涓涓?#28699;楁鐢互淇?#28699;樿秴绫?#38171;岃皟鏁村瓙绫?#37713;?#37825;?#38171;屼护瀹?#28654;?#37813;樿秴绫?#38171;岀劧鍚庡幓鎺?#28051;?#38000;?#28052;?#38338;寸殑缁?#37813;?#37711;?#32495;?#37510;?/p>

      11.12 Replace Delegation with Inherited锛堜互缁?#37813;垮彇浠?#28654;?#37813;?#38171;?52

      鍔?#37832;?#38171;?#37734;?#28051;?#28051;?#32491;?#28052;?#38338;翠娇鐢?#28654;?#37813;?#37711;?#32495;?#38171;?#39582;剁?#24531;父涓?#37825;?#28051;帴鍙?#32514;?#37712;?#29825;?#28598;?#37835;?#32480;鍗曠殑濮?#37813;樺嚱鏁?#38171;?#37826;规硶锛?#29825;?#28654;?#37813;?#32491;荤户鎵垮彈鎵?#32491;?#37510;傛敞鎰?#38171;?/p>

      • 濡?#37835;?#39582;?#23052;?#37832;変娇鐢?#37721;?#37813;?#32491;荤殑鎵鏈夊嚱鏁?#38171;岄偅涔?#28751;?#28051;?#29781;佷娇鐢?#26473;?#28051;?#37826;规硶銆傚洜涓哄瓙绫?#25652;?#29831;?#37804;?#37828;?#38316;?#23536;?#29906;?#32491;荤殑?#24116;鍙?#38171;屽鏋?#28654;?#37813;?#26473;囧鍙互閫?#26473;Remove Middle Man锛?60锛?#37826;规硶璁?#28729;?#37812;?#32468;?#29835;?#37922;?#37721;?#37813;樺嚱鏁?#38171;屾垨鑰匛xtract Superclass锛?36锛?#29825;?#28051;?#28051;?#32491;荤殑?#24116;鍙彁鐐煎埌瓒?#32491;?#28051;?#38171;?#26473;?#37721;互?#23047;鐢Extract Interface锛?41锛?#37826;规硶銆?
      • 濡?#37835;?#37721;?#37813;樺?#30789;薄琚?#28051;嶆涓涓?#37711;朵粬瀵硅薄鍏?#27996;?#38171;?#38000;?#28051;?#37721;?#37813;樺?#30789;薄鏄?#37721;?#37721;樼殑?#26882;鍊?#38171;岄偅涔?#26473;?#32457;嶆?#21613;喌涓?#38171;?#28051;嶈兘灏嗗鎵?#37711;?#32495;?#37831;?#37817;?#28051;?#32513;?#37813;?#37711;?#32495;?#38171;屽洜涓?#26473;?#37837;?#28751;?#37827;犳硶鍏?#27996;?#37825;版嵁浜?#37510;?#37825;版嵁鍏?#27996;?#37828;?#28654;?#37813;?#37711;?#32495;荤殑涓绉?#38322;?#29781;佸?#29115;兘銆?


    • 鏈?#26473;?#32520;?/a> 2019-01-16 17:50 鍙戣璇?#29825;?/a>
      ]]>
      銆?#38322;?#37835;?#37510;嬬殑璇?#28052;?#32471;?#29825;?/title><link>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433604.html</link><dc:creator>鏈?#26473;?#32520;?/dc:creator><author>鏈?#26473;?#32520;?/author><pubDate>Wed, 16 Jan 2019 09:48:00 GMT</pubDate><guid>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433604.html</guid><wfw:comment>http://www.67529968.com/zhuyuanxiang/comments/433604.html</wfw:comment><comments>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433604.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/zhuyuanxiang/comments/commentRss/433604.html</wfw:commentRss><trackback:ping>http://www.67529968.com/zhuyuanxiang/services/trackbacks/433604.html</trackback:ping><description><![CDATA[<li><a href="#鎬?#29785;?>鎬?#29785;?/a> <li><a href="#绗?绔?閲?#37835;勭涓涓?#22935;?#28186;?>绗?绔?閲?#37835;?#38171;?#32471;?#28051;涓?#22935;?#28186;?/a> <ul> <li><a href="#11-p1璧?#37904;?>1.1 (P1)璧?#37904;?/a> <li><a href="#12-p7閲?#37835;勭殑绗?#28051;姝?>1.2 (P7)閲?#37835;勭殑绗?#28051;姝?/a> </li></ul> <li><a href="#绗?绔?閲?#37835;勫師鍒?>绗?绔?閲?#37835;勫師鍒?/a> <ul> <li><a href="#21-p53浣?#29835;?#38322;?#37835;?>2.1 (P53)浣?#29835;?#38322;?#37835;?/a> <li><a href="#22-p55涓轰綍閲?#37835;?>2.2 (P55)涓轰綍閲?#37835;?/a> <li><a href="#23-p57浣曟椂閲?#37835;?>2.3 (P57)浣曟椂閲?#37835;?/a> <li><a href="#24-p60鎬?#28052;?#28725;圭?#24533;悊璇?>2.4 (P60)鎬?#28052;?#28725;圭?#24533;悊璇?/a> <ul> <li><a href="#闂存帴璁?#38338;?>闂存帴璁?#38338;?/a> </li></ul> <li><a href="#25-p62閲?#37835;勭殑?#27622;棰?>2.5 (P62)閲?#37835;勭殑?#27622;棰?/a> <li><a href="#26-p66閲?#37835;?#28051;?#29825;?#29825;?>2.6 (P66)閲?#37835;?#28051;?#29825;?#29825;?/a> <li><a href="#27-p69閲?#37835;?#28051;?#37804;兘">2.7 (P69)閲?#37835;?#28051;?#37804;兘</a> </li></ul> <li><a href="#绗?绔?浠爜?#27537;鍧忓閬?>绗?绔?浠爜?#27537;鍧忓閬?/a> <ul> <li><a href="#31-p76duplicated-code閲?#28598;?#28000;爜">3.1 (P76)Duplicated Code锛?#38322;?#28598;?#28000;爜锛?/a> <li><a href="#32-p76long-method杩?#38336;垮嚱鏁?>3.2 (P76)Long Method锛?#26473;?#38336;垮嚱鏁?#38171;?/a> <li><a href="#33-p78large-class杩囧?#27537;绫?>3.3 (P78)Large Class锛?#26473;囧?#27537;绫?#38171;?/a> <li><a href="#34-p78long-parameter-list杩?#38336;垮弬鏁?#37714;?>3.4 (P78)Long Parameter List锛?#26473;?#38336;垮弬鏁?#37714;?#38171;?/a> <li><a href="#35-p79divergent-change?#24386;鏁?#23534;忓?#27194;寲">3.5 (P79)Divergent Change锛堝彂鏁?#23534;忓?#27194;寲锛?/a> <li><a href="#36-p80shotgun-surgery闇?#23534;?#23534;?#28103;?#37824;?>3.6 (P80)Shotgun Surgery锛堥湴寮?#23534;?#28103;?#37824;?#38171;?/a> <li><a href="#37-p80feature-envy渚濇?#23339;儏缁?>3.7 (P80)Feature Envy锛?#28186;濇?#23339;儏缁?#38171;?/a> <li><a href="#38-p81data-clumps鏁版嵁娉?#37733;?>3.8 (P81)Data Clumps锛?#37825;版嵁娉?#37733;?#38171;?/a> <li><a href="#39-p81primitive-obsession鍩?#37832;?#32491;诲?#23338;亸鎵?>3.9 (P81)Primitive Obsession锛堝熀鏈?#32491;诲?#23338;亸鎵?#38171;?/a> <li><a href="#310-p82switch-statementsswitch鎯婃倸鐜拌韩">3.10 (P82)Switch Statements锛坰witch鎯婃倸鐜拌韩锛?/a> <li><a href="#311-p83parallel-inheritance-hierarchies骞宠缁?#37813;?#28003;?#32495;?>3.11 (P83)Parallel Inheritance Hierarchies锛?#39582;宠缁?#37813;?#28003;?#32495;?#38171;?/a> <li><a href="#312-p83lazy-class鍐楄禈绫?>3.12 (P83)Lazy Class锛?#37712;楄禈绫?#38171;?/a> <li><a href="#313-p83speculative-generality澶?#28598;?#37711;?#29835;?#37832;?#37833;?#37804;?>3.13 (P83)Speculative Generality锛?#28598;?#28598;?#37711;?#29835;?#37832;?#37833;?#37804;?#38171;?/a> <li><a href="#314-p84temporary-field浠?#27996;?#26473;锋?#25120;殑鏆傛椂瀛楁">3.14 (P84)Temporary Field锛?#28000;?#27996;?#26473;锋?#25120;殑鏆傛椂瀛楁锛?/a> <li><a href="#315-p84message-chains杩囧害鑰?#37722;堢殑娑堟伅閾?>3.15 (P84)Message Chains锛?#26473;囧害鑰?#37722;堢殑娑堟伅閾?#38171;?/a> <li><a href="#316-p85middle-man涓?#38338;?#27996;?>3.16 (P85)Middle Man锛?#28051;?#38338;?#27996;?#38171;?/a> <li><a href="#317-p85inappropriate-intimacy鐙?#37828;?#37711;?#32495;?>3.17 (P85)Inappropriate Intimacy锛堢嫀鏄?#37711;?#32495;?#38171;?/a> <li><a href="#318-p85alternative-classes-with-different-interfaces寮?#37831;?#37722;屽伐?#27537;绫?>3.18 (P85)Alternative Classes with Different Interfaces锛?#23534;?#37831;?#37722;屽伐?#27537;绫?#38171;?/a> <li><a href="#319-p86incomplete-library-class涓?#28729;岀?#24227;殑搴?#32491;?>3.19 (P86)Incomplete Library Class锛?#28051;?#28729;岀?#24227;殑搴?#32491;?#38171;?/a> <li><a href="#320-p86data-class骞?#32459;氱殑鏁版嵁绫?>3.20 (P86)Data Class锛?#39582;?#32459;氱殑鏁版嵁绫?#38171;?/a> <li><a href="#321-p87refused-bequest琚?#37815;?#32513;濈殑閬楄禒">3.21 (P87)Refused Bequest锛堣鎷?#32513;濈殑閬楄禒锛?/a> <li><a href="#322-comments杩囧?#27697;殑?#25950;閲?7">3.22 Comments锛?#26473;囧?#27697;殑?#25950;閲?#38171;?7</a> </li></ul> <li><a href="#绗?绔?鏋勭?#25118;祴璇?#28003;?#32495;?>绗?绔?鏋勭?#25118;祴璇?#28003;?#32495;?/a> <ul> <li><a href="#41-?#22172;?#31092;璇?#28000;爜?#27537;浠?#37706;?9">4.1 ?#22172;?#31092;璇?#28000;爜?#27537;浠?#37706;?9</a> <li><a href="#42-junit?#31092;璇曟?#21976;灦91">4.2 JUnit?#31092;璇曟?#21976;灦91</a> <li><a href="#43-娣?#37716;?#37831;村?#27693;祴璇?7">4.3 娣?#37716;?#37831;村?#27693;祴璇?7</a> </li></ul> <li><a href="#绗?2绔?澶瀷閲?#37835;?59">绗?2绔?澶瀷閲?#37835;?59</a> <li><a href="#绗?3绔?閲?#37835;勫鐢?#28051;?#37916;?#28729;?79">绗?3绔?閲?#37835;?#38171;屽鐢?#28051;?#37916;?#28729;?79</a> <ul> <li><a href="#瀹?#37711;?#38322;?#37835;?91">瀹?#37711;?#38322;?#37835;?#38171;?91锛?/a> <li><a href="#閲?#37835;勫伐鍏?>閲?#37835;勫伐鍏?/a> </li></ul> <li><a href="#绗?4绔?閲?#37835;勫伐鍏?01">绗?4绔?閲?#37835;勫伐鍏?01</a> <ul></ul></nav></aside> <h2 id="閲?#37835;勭殑璇?#28052;?#32471;?#29825;?>銆?#38322;?#37835;?#37510;嬬殑璇?#28052;?#32471;?#29825;?/h2> <h3 id="瀛?#28052;犲?#34425;">瀛?#28052;犲?#34425;锛?/h3> <p>鐔熸倝銆?#29825;?#29825;?#22959;?#23534;?#37510;嬬殑鍩?#37832;?#22994;傚康锛?#37908;熸?#22794;熀鏈殑Java璇硶锛?#37908;熸倝Eclipse鍜孞Unit?#27537;?#23047;鐢?#38171;?#37832;?#37929;?#28725;硅緝濂界殑鑻?#29831;?#37737;虹銆?/p> <h3 id="瀛?#28052;?#26473;囩">瀛?#28052;?#26473;囩锛?/h3> <ul> <li>鍏堢湅绗?绔?#38171;屾墜宸緭鍏?#28729;?#28186;嬬搴?#38171;?#27996;嗚閲?#37835;勭殑鏂规硶鍜?#26473;囩銆?#38322;?#37904;?#37828;悊瑙?#38322;?#37835;勭殑鎬?#29882;?#38171;?#37832;濂界殑?#24714;瑙?#37826;?#23534;忓氨鏄?#38315;?#26473;囧疄璺电殑鏂?#23534;忕悊瑙?#37510;? <li>鍐嶇湅绗?~4绔?#38171;屽唴瀹?#28051;?#38315;?#37815;?#37804;?#38339;?#29831;?#38171;?#23052;?#37711;磋叮?#22440;鑰呯湅涓嶆?#20636;殑?#20824;鍙互璺?#26473;?#38171;屽洜涓?#37722;庨潰杩?#37721;互鍥?#28598;村啀璇?#37510;? <li>?#24116;鐫绗?~12绔?#38171;?#37832;濂芥寜椤?#25652;?#37814;?#28000;爜涓涓?#28051;緭鍏?#38171;屽?#23942;?#22796;収浣?#38000;呯殑姝?#26976;?#38322;?#37835;勬搷浣?#28051;娆?#38171;?#39582;剁粨鍚堣嚜宸变互寰宸?#28003;?#28051;殑瀹?#29882;?#37833;悊瑙?#37510;?</li></ul> <h3 id="瀛?#28052;?#37929;殑">瀛?#28052;?#37929;殑锛?/h3> <p>?#23047;?#22172;宸辩紪鍐欑殑浠爜鏇村鏄?#29722;?#27996;?#29831;?#37811;?#37510;?/p> <h3 id="瀛?#28052;?#37808;熸偀">瀛?#28052;?#37808;熸偀锛?/h3> <ul> <li>浠爜?#27537;閲?#37835;勫簲璇?#37828;?#28051;姝?#23005;?#28729;屾?#24878;殑锛屾瘡娆?#38322;?#37835;勭殑閮?#37714;?#28051;?#29781;?#29906;?#26473;囪嚜宸辩殑?#24714;瑙兘鍔涚殑5%銆傝?#30028;劧杩?#37837;锋搷浣滅暐鏄?#32507;?#37918;?#38171;屼?#21976;槸鍙互鍑?#26462;?#28598;磋剳閲?#37835;?#26473;囩涓殑璁板繂寮?#25652;?#38171;屽?#24531;?#25116;唬鐮佸嚭?#25930;?#27537;鏈轰細銆? <li>浠爜?#27537;閲?#37835;?#28051;瀹氳?#20352;厤鍚JUnit锛圱DD锛屾祴璇曢鍔?#23534;?#24386;锛夊?#23678;垚锛屽?#23941;姞涓Git锛堢増鏈?#32480;悊锛夊拰Eclipse锛圛DE?#27537;閲?#37835;勫伐鍏?#38171;夐偅灏?#27996;?#37719;?#37716;?#37706;?#27996;?#37510;?</li></ul> <h3 id="瀛?#28052;?#28000;爜">瀛?#28052;?#28000;爜锛?/h3> <p><a href="https://github.com/zhuyuanxiang/git-java/tree/master/Refactoring-Fowler">Refactored-MartinFowler</a></p> <h2 id="鎬?#29785;?>鎬?#29785;?/h2> <ul> <li>绗?绔?#38171;堝繀璇?#38171;?#38171;屼?#24225;疄渚嬬搴忓嚭?#24386;锛?#27996;嗚閲?#37835;勭殑鏂规硶鍜?#26473;囩銆? <li>绗?绔?#38171;?#29825;?#29825;?#38322;?#37835;勭殑涓鑸?#37804;?#37720;?#37714;?#37510;?#28729;?#28052;夊拰杩?#29723;?#38322;?#37835;勭殑鍘熷洜銆? <li>绗?绔?#38171;屼粙缁嶅浣?#37714;?#37826;?#38338;?#26864;?#28000;爜锛屼互鍙?#28641;?#28003;?#37922;?#38322;?#37835;勬?#29808;?#21227;?#20903;滑銆? <li>绗?绔?#38171;屽湪浠爜涓?#37835;勫缓java?#27537;?#31092;璇?#37916;?#28583;? <li>绗?~12绔?#38171;?#37711;?#28003;撻潰瀵圭殑闂?#26864;樺拰閲?#37835;勭殑鏂规硶銆? <li>绗?3绔?#38171;Bill Opdyke鍦?#37727;?#28051;?#23534;?#24386;涓?#25652;?#37922;?#38322;?#37835;? <li>绗?4绔?#38171;岃嚜鍔?#37718;?#38322;?#37835;勫伐鍏?#38171;堜粖澶?#37930;嬫潵锛屽凡缁?#28051;?#37828;?#28598;?#28598;?#38338;?#26864;?#38171;孍clipse?#27537;Refactor宸?#32513;?#38344;炲父濂?#37922;?#38171;? <li>绗?5绔?#38171;?#38322;?#37835;勭殑鍝?#28699;?#37804;濇兂 </li></ul> <h2 id="绗?绔?閲?#37835;勭涓涓?#22935;?#28186;?>绗?绔?閲?#37835;?#38171;?#32471;?#28051;涓?#22935;?#28186;?/h2> <h3 id="11-p1璧?#37904;?>1.1 (P1)璧?#37904;?/h3> <p>鍥?#28051;轰唬?#29212;?#27537;缁撴?#21228;棤?#30838;?#24359;瓒虫坊鍔犳柊鍔熻兘?#27537;?#28214;瑕?#38171;屽洜姝?#37711;?#26473;?#29723;?#38322;?#37835;?#38171;屼娇浠爜鏂逛究娣?#37716;犳柊鍔熻兘锛岀劧鍚庡?#23942;坊鍔犳柊鍔熻兘銆?/p> <h3 id="12-p7閲?#37835;勭殑绗?#28051;姝?>1.2 (P7)閲?#37835;勭殑绗?#28051;姝?/h3> <p>棣?#37711;堢璁嚜宸?#37815;?#37832;?#28051;濂?#37721;?#38344;犵殑?#31092;璇?#37832;?#37714;?#38171;屽洜涓?#38322;?#37835;?#37832;夊彲?#20824;寮?#37711;?#38338;?#26864;?#38171;岄?#26473;囨祴璇?#28103;?#29831;?#38322;?#37835;?#23052;?#37832;夋敼鍙?#32459;?#25652;忓?#29115;兘銆?/p> <h2 id="绗?绔?閲?#37835;勫師鍒?>绗?绔?閲?#37835;勫師鍒?/h2> <h3 id="21-p53浣?#29835;?#38322;?#37835;?>2.1 (P53)浣?#29835;?#38322;?#37835;?/h3> <p>閲?#37835;?#38171;?#37722;?#29831;?#38171;?#38171;?#28725;?#26462;?#28000;?#37712;?#38318;?#32513;撴?#21229;殑涓绉嶈皟鏁?#38171;?#37929;殑鏄?#37734;?#28051;嶆敼鍙樿蒋浠?#37721;?#29785;?#28725;?#29723;?#28051;虹殑?#22688;?#24385;涓?#38171;屾彁楂樼悊瑙?#37804;?#37724;岄檷浣?#28103;?#37824;规垚鏈?#37510;?<br>閲?#37835;?#38171;堝姩璇?#38171;?#38171;氫娇鐢?#28051;绯?#37714;?#38322;?#37835;勬?#23339;硶锛屽湪涓嶆敼鍙樿蒋浠?#37721;?#29785;?#28725;?#29723;?#28051;虹殑?#22688;?#24385;涓?#38171;岃皟鏁?#37711;剁?#25780;瀯銆?br>瀹?#28052;夌殑鎵?#28766;?#38171;?/p> <ul> <li>閲?#37835;?#29825;?#26462;?#28000;?#37831;村鏄撶悊瑙?#37724;屼慨鏀? <li>閲?#37835;?#28051;嶄細鏀?#37721;樿蒋浠剁殑鍙?#29785;?#28725;?#29723;?#28051;?#38171;屽嵆?#23047;鏀?#37721;?#28052;?#37721;兘鏄?#23536;皬?#27537;褰?#37725;?#38171;岃蒋浠?#37716;熻兘涓濡?#37827;?#23536;銆?</li></ul> <p>閲?#37835;勭殑鐩?#37837;?#38171;?#37721;?#37824;?#37721;?#32459;?#25652;忓唴閮?#32513;撴瀯锛?#28051;嶆坊鍔犳柊?#27537;鍔熻兘</p> <p>涓?#29781;?#28051;蹇?#27996;?#37922;?#38171;?/p> <ul> <li>娣?#37716;犳柊鍔熻兘?#27537;?#26882;鍊?#38171;?#28051;?#38322;?#37835;勫凡鏈?#28000;爜銆? <li>閲?#37835;勪唬?#29212;?#26882;锛?#28051;嶅?#28850;?#29363;柊鍔熻兘銆?</li></ul> <h3 id="22-p55涓轰綍閲?#37835;?>2.2 (P55)涓轰綍閲?#37835;?/h3> <ul> <li>閲?#37835;勬敼杩?#26462;?#28000;?#29825;?#29825;?#38171;? <ul> <li>绋?#25652;忕殑璁?#29825;?#29840;?#38322;忓湪娌?#37832;夋寔缁?#38322;?#37835;勭殑鎯呭喌涓?#38315;愭笎鍙?#23480;?#38171;屽?#29115;兘?#27537;澧炲?#29363;垨鑰?#28103;?#37824;归兘鍙兘?#23047;浠爜瓒婃潵瓒婇毦?#20114;?#24714;瑙?#37724;?#32513;?#37814;?#38171;屽?#36779;?#23111;毦淇?#29831;?#37832;鍒濈殑璁?#29825;?#37929;?#37837;? <li>娑堥櫎閲?#28598;嶇殑浠爜涓鏂归潰鏄?#32459;?#25652;?#26473;?#29723;?#37831;村揩锛?#28051;鏂归潰鏄?#37826;逛究鏈?#37833;殑淇?#37824;?#38171;屼?#23338;锛?#38322;?#37835;勫?#24531;?#25116;唬?#29212;閲?#28598;?#38171;岄伩鍏嶅?#29115;兘?#27537;鏀?#37721;橀渶瑕佷慨鏀?#28598;?#28598;勪唬?#29212;銆?</li></ul> <li>閲?#37835;勪娇杞?#28000;?#37831;村鏄撶悊瑙?#38171;? <ul> <li>鍙婃椂濉?#29723;?#37413;?#37807;宠瀹冨仛浠涔?#37413;?#37724;?#37413;滃憡璇夊?#20904;仛浠涔?#37413;?#28052;?#38338;寸殑缂濋殭銆?#38322;?#37835;勭殑鏍?#36423;?#28751;?#37828;?#29781;?#37413;?#37713;嗙璇村?#28888;?#25118;墍瑕佺殑鈥? <li>閲嶆柊闃?#29831;讳唬?#29212;?#27537;浜?#37832;夊彲?#20824;鏄嚜宸?#38171;屼篃鍙兘鏄粬浜?#37510;? <li>閫?#26473;?#38322;?#37835;勫彲?#20114;鎶婅嚜宸?#28051;?#37908;熸倝?#27537;浠爜?#27537;鐢?#38315;旀?#23815;悊涓閬?#38171;屽?#29363;繁瀵逛唬?#29212;?#27537;?#24714;瑙?</li></ul> <li>閲?#37835;勫府鍔?#37813;惧嚭bug锛? <ul> <li>杩?#28051;?#37828;缓绔?#37734;?#28000;爜瀹?#37828;撶悊瑙?#28052;?#28051;婄殑 </li></ul> <li>閲?#37835;勬彁楂?#32514;?#32459;?#38315;?#25652;?#38171;? <ul> <li>閲?#37835;勮?#24807;埌?#22727;濂界殑璁?#29825;?#38171;?#38000;岃壇濂界殑璁?#29825;?#37831;村鏄?#28103;?#37824;逛唬?#29212;銆佸?#28850;?#29362;?#29115;兘銆?#38338;?#26864;樿皟璇?#37510;?</li></ul></li></ul> <h3 id="23-p57浣曟椂閲?#37835;?>2.3 (P57)浣曟椂閲?#37835;?/h3> <p>閲?#37835;勭殑涓夋?#30838;鍒?#38171;?/p> <ul> <li>绗?#28051;娆?#23534;?#24386;?#28999;涓?#37716;熻兘?#27537;?#26882;鍊欎互瀹?#37916;?#28051;?#37929;?#37837;?#37510;? <li>绗?#27996;屾寮鍙戠浉鍚屽?#29115;兘?#27537;?#26882;鍊?#38171;?#37711;?#37714;惰嚜宸辩殑鍙嶆劅锛?#32513;?#32513;?#38322;?#28598;?#28729;?#37916;?#37510;? <li>绗?#28051;夋寮鍙戠浉鍚屽?#29115;兘?#27537;?#26882;鍊?#38171;屽簲璇?#38322;?#37835;?#37510;?</li></ul> <p>閲?#37835;勭殑?#26882;闂寸偣锛?/p> <ul> <li>娣?#37716;犲?#29115;兘?#26882;閲?#37835;?#38171;? <ul> <li>涓鏂归潰鍙互甯?#37716;悊瑙渶瑕佷慨鏀圭殑浠爜 <li>涓鏂归潰鏄娇鐜?#37734;互鍙?#37832;?#37833;?#28583;炲?#29363;柊鍔熻兘鏇村?#29362;鏄?#37510;?</li></ul> <li>淇?#29723;敊璇椂閲?#37835;?#38171;? <ul> <li>?#22189;鐜bug?#27537;?#26882;鍊?#38171;岄毦?#20114;鎵惧嚭闂?#26864;?#37813;鍦殑?#26882;鍊?#38171;屽緢鏈夊彲?#20824;鏄?#28000;爜涓嶆竻鏅?#28725;?#38007;存煡鎵bug?#27537;鍥伴毦銆?</li></ul> <li>澶?#28729;?#28000;爜?#26882;閲?#37835;?#38171;? <ul> <li>澶?#28729;?#28000;爜鏈夊姪浜庣煡璇嗙殑浼犳挱锛?#37832;夊埄浜?#28000;爜琚?#32514;?#37712;?#38000;?#28052;?#28598;栫殑浜虹悊瑙?#37510;? <li>閲?#37835;勫?#29363;繁浜嗗?#36891;唬?#29212;?#27537;?#24714;瑙?#38171;?#37832;夊埄浜庢彁鍗囧瀹?#28000;爜?#27537;?#20824;鍔?</li></ul></li></ul> <p>澶?#28729;?#37733;?#38339;?#38171;?#37721;?#29781;佷唬鐮佷綔鑰呭拰涓涓?#28729;煡鑰?#38000;?#37510;傝緝澶殑椤?#37929;?#37721;互閫?#26473;UML鍥惧幓灞曠?#36720;唬?#29212;?#27537;閫昏緫銆?/p> <p>绋?#25652;忛毦?#20114;淇?#37824;圭殑鍘熷洜锛?/p> <ul> <li>?#27622;?#20114;闃?#29831;荤殑绋?#25652;? <li>閫昏緫閲?#28598;嶇殑绋?#25652;? <li>娣?#37716;犳柊鐗规渶瑕佷慨鏀?#23480;?#37832;?#28000;爜?#27537;绋?#25652;? <li>甯?#28598;嶆?#20638;昏緫鍒?#37826;殑绋?#25652;?</li></ul> <p>閲?#37835;勭殑鐩?#37837;?#38171;?/p> <ul> <li>浠爜瀹?#37828;?#38339;?#29831;? <li>鎵鏈?#38315;昏?#25126;兘鍙?#37832;夊敮涓鍦?#37904;规?#22247;畾 <li>?#26570;?#27537;鏀?#37716;?#28051;嶄細鍗?#37721;?#37916;?#37832;夎涓? <li>灏藉彲?#20824;绠鍗?#29723;?#26440;?#38315;昏緫 </li></ul> <h3 id="24-p60鎬?#28052;?#28725;圭?#24533;悊璇?>2.4 (P60)鎬?#28052;?#28725;圭?#24533;悊璇?/h3> <ul> <li>鎳?#37814;鏈殑缁忕悊锛屽緢瀹?#37828;撴閫?#38171;? <li>杩芥眰璐?#38322;忕殑缁忕悊锛屼粙缁?#38322;?#37835;勫璐?#38322;忕殑甯?#37716;?#38171;? <li>杩芥眰杩?#25652;殑缁忕悊锛屽垯?#22172;宸?#28729;?#38344;?#37734;?#38322;?#37835;?#37510;傚洜涓?#38322;?#37835;勫彲?#20114;鏈?#25577;?#27537;瀹屾垚浠诲姟锛屽氨鏄?#28725;圭?#24533;悊鏈澶殑甯?#37716;?#37510;?</li></ul> <h4 id="闂存帴璁?#38338;?>闂存帴璁?#38338;?/h4> <p>寰?#28598;氭椂鍊?#38322;?#37835;勯兘涓虹搴忓紩鍏?#38338;存帴璁?#38338;?#38171;?/p> <ul> <li>鎶?#28598;瀷瀵硅薄鎷?#37714;嗘垚灏忓?#30789;薄 <li>鎶?#28598;?#37736;嬪嚱鏁版媶鍒?#28051;?#28751;忓?#23338;嚱鏁?#37510;?</li></ul> <p>闂存帴璁?#38338;殑浠?#37706;?#38171;?/p> <ul> <li>鍏?#29825;?#38315;昏緫鍏?#27996;?#38171;?#28051;涓?#37713;?#37825;?#37734;?#28051;?#37722;屽湴鐐硅璋?#37922;?#37510;傚瓙绫?#37711;?#27996;?#29906;?#32491;荤殑鏂规硶銆? <li>鍒?#23534;瑙?#38322;婃?#24531;?#24807;?#23677;疄鐜?#38171;?#38315;?#26473;?#32491;?#37722;?#37724;屽嚱鏁?#37722;?#29785;?#38322;婅嚜宸辩殑鎰忓浘 <li>闅旂鍙樺寲锛?#37734;?#28051;?#37722;屽?#29256;柟?#23047;鐢?#37722;?#28051;涓?#28725;硅薄锛岄渶瑕佷慨鏀?#28051;澶?#38315;昏緫锛岄偅涔?#37721;互?#20187;?#22189;?#29913;绫?#38171;?#39582;?#37734;渶瑕佺殑?#26882;鍊?#28103;?#37824;?#26473;?#28051;瓙绫?#37510;? <li>灏佽鏉?#28000;堕昏緫锛?#26473;?#37922;?#28598;?#37804;?#37510;?#28751;嗘潯浠堕昏?#25123;浆鍖?#28051;烘?#22559;伅妯?#23534;?#37510;?</li></ul> <p>鍑忓皯闂存帴?#30512;?#27537;鏉?#28000;?褰?#38338;存帴?#30512;鍙?#37734;?#28051;澶勪娇鐢?#38171;岄偅涔堥渶瑕?#28751;?#37711;舵?#22565;櫎銆?/p> <h3 id="25-p62閲?#37835;勭殑?#27622;棰?>2.5 (P62)閲?#37835;勭殑?#27622;棰?/h3> <p>鏁版嵁搴?#38322;?#37835;?#38171;?/p> <ul> <li>瀛?#37734;?#38338;?#26864;?#38171;? <ul> <li>绋?#25652;?#28051;?#37825;版嵁搴?#38000;?#37722;?#37734;?#28051;璧?#37510;? <li>鏁版嵁杩佺銆?</li></ul> <li>瑙?#37712;?#37826;规锛? <ul> <li>鍦?#38344;?#37711;?#32495;诲瀷鏁版嵁搴?#38171;屽彲?#20114;鍦?#37825;版嵁搴?#37724;屽?#30789;薄妯瀷涓?#37819;?#37711;?#28051;涓?#37714;嗙?#35826;眰锛岄?#26050;涓?#38000;?#28052;?#38338;寸殑鍙樺寲 </li></ul></li></ul> <p>?#24116;鍙?#38322;?#37835;?/p> <ul> <li>瀵?#27996;?#23480;?#32513;忓彂?#31479;?#27537;?#24116;鍙渶瑕?#37721;兘?#28214;瑕?#32513;?#37814;?#37827;帴鍙?#37724;?#37826;版帴鍙?#38171;?#37922;deprecated淇?#29256;棫?#24116;鍙?#37510;? <li>涓嶅彂?#31479;鏂版帴鍙?#38171;屽湪鏃帴鍙?#28051;?#29835;?#37922;?#37826;版帴鍙?#37510;? <li>鍋囧鏂版帴鍙?#37814;?#37713;虹紪璇戞椂寮傚父锛岄偅涔?#37721;互鍦?#37827;帴鍙?#28051;?#29835;?#37922;?#37826;版帴鍙?#39582;?#28751;嗙紪璇戞椂寮傚父杞?#37718;?#28051;?#26473;?#29723;屾椂寮傚父銆?</li></ul> <p>涓?#38322;?#37835;勭殑鏉?#28000;?#38171;?/p> <ul> <li>閲?#37835;勪?#23338;墠锛屼唬?#29212;鍦?#28598;?#38318;?#37714;嗘?#21613;喌涓嬮兘?#20824;澶熸?#29238;杩?#29723;?#38171;屽氨鍙互閲?#37835;?#38171;屽惁鍒?#25652;?#29831;?#37828;?#38322;?#37712;?#37510;? <li>?#22476;浜Deadline锛屽簲璇?#38316;?#37711;?#38322;?#37835;?#37510;?</li></ul> <h3 id="26-p66閲?#37835;?#28051;?#29825;?#29825;?>2.6 (P66)閲?#37835;?#28051;?#29825;?#29825;?/h3> <p>閲?#37835;?#28051;?#29825;?#29825;?#37828;?#35120;?#23005;?#27996;?#29723;殑锛?/p> <ul> <li>璁?#29825;?#25652;?#29831;?#37734;?#32514;?#37934;佷?#23338;墠锛屼?#21976;槸璁?#29825;?#37804;?#37832;夌己闄?#38171;岄殢鐫瀵?#38338;?#26864;?#29825;?#29831;嗙殑閫愭?#24877;繁鍏?#38171;岄?#26473;?#38322;?#37835;勫彲?#20114;鏀瑰杽璁?#29825;殑璐?#38322;?#37510;? <li>閲?#37835;勫噺杞?#27996;?#29825;?#29825;殑闅惧害鍜屽帇鍔?#38171;屽湪绋?#25652;?#28051;?#37826;?#28103;?#37824;圭殑杩囩涓?#38315;?#23005;?#28729;屽?#21229;搴忕殑璁?#29825;?#37510;?</li></ul> <h3 id="27-p69閲?#37835;?#28051;?#37804;兘">2.7 (P69)閲?#37835;?#28051;?#37804;兘</h3> <p>閲?#37835;?#37828;?#37832;夊彲?#20824;瀵?#38007;寸搴?#26473;?#29723;屽彉?#21443;?#27537;锛屼?#21976;槸涓嶉渶瑕?#37734;?#29825;?#29825;?#37724;岀紪?#29212;?#26882;灏?#38000;冭?#25118;兘闂?#26864;?#37510;?#28186;嬪锛?#28729;炴椂绋?#25652;忕殑缂?#37712;?#38171;?/p> <ul> <li>棣?#37711;?#37712;欏嚭鍙?#29835;冪殑绋?#25652;? <li>鐒?#37722;?#29835;?#37825;村?#20903;互杈?#37714;版兘?#27537;瑕佹眰銆? <ul> <li>缁?#26473;囧?#21976;瀽澶?#38318;?#37714;嗙搴忕殑涓?#29781;佹椂闂?#37828;?#23057;?#38000;?#37734;皬閮?#37714;嗕唬?#29212;涓?#38171;屾墍?#20114;涓?#37922;?#28725;规墍鏈?#28000;爜杩?#29723;屼?#27194;寲銆? <li>鎬兘浼樺寲鏀?#37734;?#23534;鍙戠殑鍚?#37832;?#38171;屽埄鐢?#37714;嗘瀽宸?#37711;?#37813;惧?#28888;秷鑰?#28598;?#38322;忔椂闂寸殑浠爜锛岀劧鍚庨泦涓?#28028;樺寲銆?</li></ul></li></ul> <h2 id="绗?绔?浠爜?#27537;鍧忓閬?>绗?绔?浠爜?#27537;鍧忓閬?/h2> <h3 id="31-p76duplicated-code閲?#28598;?#28000;爜">3.1 (P76)Duplicated Code锛?#38322;?#28598;?#28000;爜锛?/h3> <ul> <li>鍚?#28051;?#32491;?#28051;?#28051;?#37713;?#37825;?#28699;?#37734;?#37929;?#37722;岃杈惧紡锛欵xtract Method锛堟彁鐐煎嚱鏁?#38171;? <li>浜?#28051;?#37711;勫?#29114;被鍐呭瓨鍦?#37929;?#37722;岃杈惧紡锛? <ul> <li>Extract Method鈫扨ullUp Method锛堝嚱鏁?#28051;婄锛? <li>濡?#37835;?#28000;爜鍙?#37828;?#37929;?#28028;?#38171;?#37711;?#26473;?#37922;Extract Method锛堟彁鐐煎嚱鏁?#38171;夊垎寮鍐岶orm TemPlate Method锛堝閫?#22959;?#37833;垮嚱鏁?#38171;?</li></ul> <li>涓?#28051;?#23011;?#28051;?#37929;?#39582;茬殑绫?#28699;?#37734;?#38322;?#28598;?#28000;爜锛欵xtract Class锛堟彁鐐?#32491;?#38171;?</li></ul> <h3 id="32-p76long-method杩?#38336;垮嚱鏁?>3.2 (P76)Long Method锛?#26473;?#38336;垮嚱鏁?#38171;?/h3> <p>鍘?#37714;?#38171;?#28751;?#38322;忓埄鐢?#37713;?#37825;?#37722;嶇?#29256;潵瑙?#38322;?#37922;?#38315;?#38171;?#38000;?#28051;?#37828;敞閲?#37510;?br>鍏抽敭锛?#28000;爜涓?#29781;?#37922;?#37833;?#37819;?#26473;?#37413;滃仛浠涔?#37413;?#38171;?#38000;?#28051;?#37828;?#37819;?#26473;?#37413;?#37804;?#28052;堝仛鈥?#37510;?#28186;嬪锛getAge()琛?#26440;捐幏鍙?#39582;撮緞锛?#38000;宼oday-birthday灏卞?#28850;姞浜嗙悊瑙殑闂存帴鎬?#38171;岃?#30028;?#21057;湅浠爜?#27537;浜轰?#29115;兘鏄?#37927;藉惈涔?#38171;屼?#21976;槸灏遍渶瑕?#28598;氭兂涓涓?#38171;?#39582;朵笖birthday鏈夊彲?#20824;琛?#26440;剧殑涓?#37828;煇涓?#27996;虹殑?#22189;鐢?#37827;?#37832;熷憿锛?#38000;?#37828;煇涓?#28052;?#37733;?#37833;殑浜?#37725;佺殑鍛?#38171;?#38317;?#37721;兘琛?#26440;剧殑灏?#37828;娇鐢椂?#26289;浜?#37510;?<br>鍏?#28003;撴?#21613;喌锛?/p> <ul> <li>鍑?#37825;?#37832;夊閲忓弬鏁?#37724;?#28051;存椂鍙?#38322;?#38171;欵xtract Method锛堟彁鐐煎嚱鏁?#38171;? <li>鐢Replace Temp with Query锛堜互?#29025;璇?#37721;?#28000;?#28051;存椂鍙?#38322;?#38171;夋?#22565;櫎涓存椂鍙?#38322;? <li>鐢Introduce Parameter Object锛?#23534;?#37711;?#37721;?#37825;?#28725;硅薄锛夋垨鑰匬reserve Whole Object锛?#28103;濇?#20344;?#30789;薄瀹?#37825;?#38171;夋潵灏?#28598;氶暱?#27537;鍙?#37825;?#37714;楄鍙?#23536;?#32480;娲?#28051;鐐?#37510;? <li>濡?#37835;滄?#22796;収涓?#26473;版楠?#26473;樺瓨鍦?#28598;?#28598;?#37721;?#38322;忓?#23677;弬鏁?#28751;遍渶瑕?#37922;埌Replace Method with Method Object锛堜互鍑?#37825;?#28725;硅薄鍙?#28000;?#37713;?#37825;?#38171;? <li>鏉?#28000;?#29723;?#26440;惧?#24531;彲?#20114;鐢Decompose Conditional锛?#37714;嗚鏉?#28000;?#29723;?#26440;惧紡锛?#29785;?#37712;? <li>鍙互灏?#23536;?#37916;?#37712;呯殑浠爜?#24385;鐐?#28051;?#37713;?#37825;?#37510;?</li></ul> <h3 id="33-p78large-class杩囧?#27537;绫?>3.3 (P78)Large Class锛?#26473;囧?#27537;绫?#38171;?/h3> <p>鏈夋椂鍊?#32491;?#39582;堕潪鍦?#37813;鏈夋椂鍒婚兘?#23047;鐢?#28729;?#28186;?#37721;?#38322;?#38171;氫娇鐢Extract Method鍜孍xtract Subclass锛堟彁鐐煎瓙绫?#38171;?/p> <p>绫?#28051;?#37832;夊澶?#28000;爜锛?/p> <ul> <li>Extract Class锛堟彁鐐?#32491;?#38171;? <li>Extract Subclass锛堟彁鐐煎瓙绫?#38171;? <li>Extract Interface锛堟彁渚涙帴鍙?#38171;夊?#21978;绫荤殑琛?#28051;?#37510;?#28699;?#37734;GUI?#27537;?#26882;鍊?#38171;屽彲?#20114;Duplicate Observed Data锛?#28598;?#37714;?#37413;滆鐩戣鏁版嵁鈥?#38171;?#38171;屽?#21977;鏁版嵁鍜岃涓哄埌涓氬姟妯瀷涓幓銆?</li></ul> <h3 id="34-p78long-parameter-list杩?#38336;垮弬鏁?#37714;?>3.4 (P78)Long Parameter List锛?#26473;?#38336;垮弬鏁?#37714;?#38171;?/h3> <ul> <li>濡?#37835;?#37721;互璋?#37922;?#23480;?#37832;夊?#30789;薄鑾?#37721;栫殑璇?#37721;互?#23047;鐢Replace Parameter with Methods锛堜互鍑?#37825;?#37721;?#28000;?#37721;?#37825;?#38171;? <li>灏嗘潵?#22172;鍚?#28051;瀵硅薄?#27537;鏁版嵁鏀堕?#21978;?#38155;潵锛屼互璇?#28725;硅薄鏇?#28000;?#38171;歅reserve Whole Object锛?#28103;濇?#20344;?#30789;薄瀹?#37825;?#38171;? <li>濡?#37835;?#37713;?#28051;?#37721;?#37825;版?#37828;?#37722;屾椂?#22189;鐜?#38171;岄偅涔?#37721;互鑰冭檻Introduce Parameter Object锛?#23534;?#37711;?#37721;?#37825;?#28725;硅薄锛?</li></ul> <h3 id="35-p79divergent-change?#24386;鏁?#23534;忓?#27194;寲">3.5 (P79)Divergent Change锛堝彂鏁?#23534;忓?#27194;寲锛?/h3> <p>涓?#37722;岀殑鍙樺?#26663;奖鍝嶇潃鐩?#37722;岀殑绫?#37721;戠?#29112;敼鍙?#38171;屽嵆鍙樺?#26667;殑璁煡鏈夊?#21976;锛圖ivergent锛?#37510;傞?#26473;Extract Class鎶?#28051;?#37722;岀殑鍔熻兘灏佽?#21613;埌涓?#37722;岀殑绫?#28051;?#38171;屼娇?#30241;涓?#32491;?#37721;?#37733;?#28051;绉?#37721;樺寲鑰岄渶瑕佷慨鏀?/p> <h3 id="36-p80shotgun-surgery闇?#23534;?#23534;?#28103;?#37824;?>3.6 (P80)Shotgun Surgery锛堥湴寮?#23534;?#28103;?#37824;?#38171;?/h3> <p>鐩?#37722;岀殑鍙樺?#26662;細娑夊?#23106;埌澶?#28051;?#32491;?#37721;戠敓淇?#37824;?#38171;?#32491;讳技闇?#23534;规灙?#30368;鍑荤殑鏁?#37835;?#37510;?br>鍙互閫?#26473;Extract Method锛孧ove Method锛孖nline Class鎶?#28051;绉?#37721;樺寲浜?#37922;熺殑澶?#28051;?#28103;?#37824;圭?#35826;埌鍚?#28051;涓?#32491;?#28051;?#37510;?/p> <p>瀵规瘮锛?/p> <ul> <li>Divergent Change锛堝彂鏁?#23534;忓?#27194;寲锛?#37828;?#28051;涓?#32491;?#37721;楀埌?#27537;澶?#28051;?#37721;樺?#26663;奖鍝?#38171;? <li>Shotgun Surgery锛堥湴寮?#23534;?#28103;?#37824;?#38171;?#37828;?#28051;涓?#37721;樺寲寮?#29863;?#28598;?#28051;?#32491;婚渶瑕佷慨鏀?#37510;?</li></ul> <h3 id="37-p80feature-envy渚濇?#23339;儏缁?>3.7 (P80)Feature Envy锛?#28186;濇?#23339;儏缁?#38171;?/h3> <p>绫?#28051;殑?#28999;涓?#37713;?#37825;?#28725;?#37711;朵粬绫荤殑渚濊禆搴?#26473;?#26946;?#38171;屽垯搴?#29831;?#38315;?#26473;Move Method锛堢鍔?#37713;?#37825;?#38171;夊皢瀹冩惉绉诲埌鍚?#38315;傜殑绫?#28051;?#37510;?/p> <h3 id="38-p81data-clumps鏁版嵁娉?#37733;?>3.8 (P81)Data Clumps锛?#37825;版嵁娉?#37733;?#38171;?/h3> <p>鏁版嵁椤规?#37828;?#37812;愮兢缁?#38339;熷嚭鐜?#38171;岄?#26473;Extract Class灏?#28729;冧滑?#24385;鐐煎埌涓涓?#37913;?#32468;?#28725;硅薄涓?#38171;屼粠鑰岀缉鐭?#37721;?#37825;?#37714;楄锛?#32480;鍖栧嚱鏁拌皟鐢?#37510;?/p> <p>鍒?#37826;?#37825;版嵁椤?#37828;?#37722;?#37929;?#37711;崇殑鏂规硶锛?#28641;?#37835;?#26473;?#27996;?#37825;版嵁椤?#28051;?#37734;?#28051;璧锋椂灏?#28598;卞幓浜嗘槑纭殑鍚?#28052;?#38171;岄偅涔?#28751;?#37721;互鎶?#28729;冧滑?#24385;鐐?#37812;?#28051;涓柊?#27537;瀵硅薄銆?/p> <h3 id="39-p81primitive-obsession鍩?#37832;?#32491;诲?#23338;亸鎵?>3.9 (P81)Primitive Obsession锛堝熀鏈?#32491;诲?#23338;亸鎵?#38171;?/h3> <ul> <li>鏈?#27996;?#28699;楁鍙互鐢?#28725;硅薄琛?#32448;?#37831;村?#21977;Replace Data Value with Object锛堜互瀵硅薄鍙?#28000;?#37825;版嵁鍊?#38171;? <li>瀵?#27996;?#28051;嶅奖鍝?#29723;?#28051;虹殑绫诲?#23340;爜鍙互Replace Type Code with Class锛堜互绫?#37721;?#28000;?#32491;诲?#23340;爜锛? <li>褰?#37725;?#29723;?#28051;虹殑绫诲?#23340;爜鍙互Replace Type Code with Subclasses锛堜互?#29913;绫?#37721;?#28000;?#32491;诲?#23340;爜锛?#38171;?#32491;诲?#23340;爜鍦?#26473;?#29723;屾?#26421;細鍙樺寲灏辩敤Replace Type Code with State/Strategy锛堜互State/Strategy鍙?#28000;?#32491;诲?#23340;爜锛?</li></ul> <h3 id="310-p82switch-statementsswitch鎯婃倸鐜拌韩">3.10 (P82)Switch Statements锛坰witch鎯婃倸鐜拌韩锛?/h3> <ul> <li>?#23047;鐢Replace Type Code with Subclasses锛堜互?#29913;绫?#37721;?#28000;?#32491;诲?#23340;爜锛夋垨鑰匯eplace Type Code with State/Strategy锛堜互State/Strategy鍙?#28000;?#32491;诲?#23340;爜锛? <li>杞?#38322;忕骇?#27537;瑙?#37712;?#37826;规硶锛歊eplace Parameter with Explicit Methods锛堜互鏄庣鍑?#37825;?#37721;?#28000;?#37721;?#37825;?#38171;?</li></ul> <h3 id="311-p83parallel-inheritance-hierarchies骞宠缁?#37813;?#28003;?#32495;?>3.11 (P83)Parallel Inheritance Hierarchies锛?#39582;宠缁?#37813;?#28003;?#32495;?#38171;?/h3> <p>姣忓綋涓?#28051;涓?#32491;诲?#28850;?#29362;瓙绫诲繀椤?#28052;?#28051;?#37721;?#28598;?#28051;涓?#32491;诲?#28850;姞涓涓瓙绫?#38171;岄偅涔?#28751;?#29825;?#28051;涓?#32513;?#37813;?#28003;?#32495;荤殑瀹?#28186;?#23534;?#37922;?#37721;?#28051;涓?#32513;?#37813;?#28003;?#32495;荤殑瀹?#28186;?#37510;?/p> <h3 id="312-p83lazy-class鍐楄禈绫?>3.12 (P83)Lazy Class锛?#37712;楄禈绫?#38171;?/h3> <p>娌?#37922;殑绫?#38171;屼娇鐢Inline Class锛?#37712;呰仈绫?#38171;夋垨鑰匔ollapse Hierarchy锛?#37814;?#37721;?#32513;?#37813;?#28003;?#32495;?#38171;夋潵瑙?#37712;?/p> <h3 id="313-p83speculative-generality澶?#28598;?#37711;?#29835;?#37832;?#37833;?#37804;?>3.13 (P83)Speculative Generality锛?#28598;?#28598;?#37711;?#29835;?#37832;?#37833;?#37804;?#38171;?/h3> <ul> <li>涓?#37832;?#37833;?#29825;?#29825;殑绫?#38171;屼娇鐢Inline Class锛?#37712;呰仈绫?#38171;夋垨鑰匔ollapse Hierarchy锛?#37814;?#37721;?#32513;?#37813;?#28003;?#32495;?#38171;夋潵瑙?#37712;? <li>涓?#37832;?#37833;?#29825;?#29825;殑鍑?#37825;?#37721;?#37825;?#38171;屼娇鐢Remove Parameter锛堢?#23130;櫎鍙?#37825;?#38171;? <li>鍑?#37825;?#37722;嶇?#26495;暟?#26858;锛屼娇鐢Rename Method锛堝嚱鏁版敼鍚?#38171;?</li></ul> <h3 id="314-p84temporary-field浠?#27996;?#26473;锋?#25120;殑鏆傛椂瀛楁">3.14 (P84)Temporary Field锛?#28000;?#27996;?#26473;锋?#25120;殑鏆傛椂瀛楁锛?/h3> <p>瀵硅薄涓煇涓?#28699;楁浠?#28051;虹壒瀹氭?#21613;喌鑰?#29825;?#37510;備娇鐢Extract Class锛堟彁鐐?#32491;?#38171;夊皢杩?#28051;?#28699;楁?#22443;彁鍙栧?#28888;潵</p> <h3 id="315-p84message-chains杩囧害鑰?#37722;堢殑娑堟伅閾?>3.15 (P84)Message Chains锛?#26473;囧害鑰?#37722;堢殑娑堟伅閾?#38171;?/h3> <p>娑堟伅閾?#38171;?#37922;?#37812;?#38315;?#26473;?#28051;涓?#28725;硅薄鑾?#37721;?#37721;?#28051;涓?#28725;硅薄锛屽?#23945;?#26473;囪幏鍙栫殑瀵硅薄璇锋眰鍙?#28051;涓?#28725;硅薄锛屽姝?#37823;?#28003;?#28751;?#37828;?#23057;堟伅閾?#37510;?#38322;囧彇杩?#32457;?#37826;?#23534;?#37808;忓?#23815;潃瀹?#37812;?#28000;爜灏?#28051;庢煡鎵?#26473;囩涓殑瀵艰埅缁撴?#21229;瀵嗚?#37722;?#38171;屽彲?#20114;?#23047;鐢Hide Delegate锛堥殣钘?#37413;?#28654;?#37813;?#37711;?#32495;?#37413;?#38171;?#26473;?#29723;?#38322;?#37835;?#37510;?#28003;嗘槸璋?#37809;?#28598;勭悊锛?/p> <h3 id="316-p85middle-man涓?#38338;?#27996;?>3.16 (P85)Middle Man锛?#28051;?#38338;?#27996;?#38171;?/h3> <p>杩囧害濮?#37813;樺舰鎴?#28051;?#38338;?#27996;?Remove Middle Man锛堢?#23130;櫎涓?#38338;?#27996;?#38171;?/p> <p>濡?#37835;?#28051;?#38338;?#27996;?#26473;?#37832;?#37711;朵粬琛?#28051;?Replace Delegation with Inherited锛堜互缁?#37813;垮彇浠?#28654;?#37813;?#38171;?/p> <h3 id="317-p85inappropriate-intimacy鐙?#37828;?#37711;?#32495;?>3.17 (P85)Inappropriate Intimacy锛堢嫀鏄?#37711;?#32495;?#38171;?/h3> <ul> <li>涓?#28051;?#32491;?#37929;?#27996;?#28186;濊禆杩囧锛?#38010;?#29840;?#28598;?#38322;忔椂闂村幓鑾?#37721;?#28725;?#37826;圭殑private鎴愬?#27194;唴瀹?#38171;屼娇鐢Move Field锛堢鍔?#28699;楁锛夊拰Move Method锛堢鍔?#37826;规硶锛夊?#24531;?#25123;?#37722;?#37804;?#38171;屾垨鐢Change Bidirectional Association to Unidirectional锛?#28751;?#37721;屽悜鍏宠仈鏀?#28051;?#37719;?#37722;?#37711;宠仈锛? <li>濡?#37835;?#28051;?#28051;?#32491;?#37827;犳硶绉?#37716;?#37929;?#37722;?#37825;版嵁鍜屽嚱鏁?#38171;屽彲?#20114;?#23047;鐢Extract Class锛堟彁鐐?#32491;?#38171;?璁粬浠娇鐢柊绫?#26473;?#29723;?#27996;?#27996;?#37510;?</li></ul> <h3 id="318-p85alternative-classes-with-different-interfaces寮?#37831;?#37722;屽伐?#27537;绫?>3.18 (P85)Alternative Classes with Different Interfaces锛?#23534;?#37831;?#37722;屽伐?#27537;绫?#38171;?/h3> <p>涓?#28051;?#37713;?#37825;板仛浜?#37929;?#37722;岀殑浜嬫儏鍗?#37832;?#28051;?#37722;岀殑鍑?#37825;?#37722;嶇</p> <h3 id="319-p86incomplete-library-class涓?#28729;岀?#24227;殑搴?#32491;?>3.19 (P86)Incomplete Library Class锛?#28051;?#28729;岀?#24227;殑搴?#32491;?#38171;?/h3> <p>搴?#37713;?#37825;?#37716;熻兘涓嶈冻锛岄渶瑕佸?#28850;姞涓浜涜嚜瀹?#28052;夌殑鍔熻兘锛?/p> <ul> <li>?#28214;瑕佸姞鍏?#28751;?#38322;?#37823;?#28003;?#38171;屼娇鐢Introduce Foreign Method锛?#23534;?#37711;?#28598;?#37716;犲嚱鏁?#38171;? <li>?#28214;瑕佸姞鍏?#28598;?#38322;?#37823;?#28003;?#38171;屼娇鐢Introduce Local Extension锛?#23534;?#37711;?#37832;?#37734;版墿灞?#38171;?</li></ul> <h3 id="320-p86data-class骞?#32459;氱殑鏁版嵁绫?>3.20 (P86)Data Class锛?#39582;?#32459;氱殑鏁版嵁绫?#38171;?/h3> <p>骞?#32459;氱殑鏁版嵁绫?#38171;?#37721;?#37832;?#37825;版嵁娌?#37832;夎涓虹殑绫?#38171;?#37711;朵粬绫婚渶瑕佸璇?#32491;荤殑鏁版嵁杩?#29723;屽彇鍊?#29825;惧?#37823;?#28003;?/p> <ul> <li>?#23047;鐢Encapsulate Field锛?#28751;佽?#21613;?#26945;锛夊拰Encapsulate Collection锛?#28751;佽?#21620;泦鍚?#38171;夊瀛楁杩?#29723;屽?#22562;悊鍦?#28751;佽 <li>瀵?#27996;?#28051;?#29831;?#29722;?#37711;朵粬绫?#28103;?#37824;圭殑瀛楁:Remove Setting Method锛堢?#23130;櫎璁惧煎嚱鏁?#38171;?</li></ul> <h3 id="321-p87refused-bequest琚?#37815;?#32513;濈殑閬楄禒">3.21 (P87)Refused Bequest锛堣鎷?#32513;濈殑閬楄禒锛?/h3> <p>濡?#37835;滃瓙绫?#28051;嶆効鎰忔帴鍙楄秴绫荤殑鎵鏈夊畾涔?#38171;屽簲璇娇鐢Replace inherited with Delegation锛堜互濮?#37813;?#37721;?#28000;?#32513;?#37813;?#38171;夋潵澶勭悊?#29913;绫?/p> <h3 id="322-comments杩囧?#27697;殑?#25950;閲?7">3.22 Comments锛?#26473;囧?#27697;殑?#25950;閲?#38171;?7</h3> <p>?#23047;鐢Extract Method锛堟彁鐐?#37826;规硶锛夋潵瑙?#37712;虫敞閲?#26473;囧闂?#26864;?#38171;屾敞閲?#37831;村搴?#29831;?#29831;?#37828;庣殑鏄?#37413;?#37804;?#28052;堝仛鈥?#38171;?#38000;?#28051;?#37828;?#37413;滃仛浠涔?#37413;?#38171;屼?#23338;锛?#28725;?#28051;涓帓搴忓嚱鏁拌鏄?#37711;?#38322;?#37922;?#27996;屽?#21976;硶?#24083;搴?#38171;?#38000;?#28051;?#37828;?#29831;?#37828;庡畠鏄?#28051;帓搴忓嚱鏁?#38171;屽洜涓?#26473;?#28051;?#29831;?#37828;?#37734;?#37713;?#37825;?#37722;嶇涓?#23480;?#32513;?#37711;?#28598;?#37510;?/p> <h2 id="绗?绔?鏋勭?#25118;祴璇?#28003;?#32495;?>绗?绔?鏋勭?#25118;祴璇?#28003;?#32495;?/h2> <h3 id="41-?#22172;?#31092;璇?#28000;爜?#27537;浠?#37706;?9">4.1 ?#22172;?#31092;璇?#28000;爜?#27537;浠?#37706;?9</h3> <ul> <li>纭?#28103;?#37813;鏈夋祴璇曢兘瀹?#37711;嚜鍔?#37718;?#38171;?#29825;?#28729;冧滑妫?#29025;?#22172;宸辩殑?#31092;璇曠?#25780;灉锛? <li>涓濂楁祴璇?#28751;?#37828;?#28051;涓?#23534;?#28598;殑bug鎺?#23092;嬪櫒锛岃兘澶?#28598;?#28598;?#32514;?#37713;忔煡鎵bug鎵?#28214;瑕?#38010;?#29840;圭殑?#26882;闂?#37510;? <ul> <li>鍥?#28051;轰唬?#29212;鍒?#37714;?#37712;?#28729;?#38171;屾祴璇曞嚭鐜?#38338;?#26864;?#37722;?#38171;屽績閲屽緢?#31483;妤氳嚜宸变慨鏀规垨鑰?#23075;?#37716;?#27996;?#37725;?#27996;?#28051;滆锛屽彲?#20824;?#32048;鍦?#37725;?#38322;屽嚭鐜?#27996;?#38338;?#26864;?#37510;? <h3 id="42-junit?#31092;璇曟?#21976;灦91">4.2 JUnit?#31092;璇曟?#21976;灦91</h3></li></ul> <li>棰戠箒鍦?#26473;?#29723;屾祴璇?#38171;? <li>?#30241;娆?#32514;?#29831;戝墠?#20824;杩?#29723;?#28051;娆祴璇?#38171;? <li>姣忓鑷?#28751;戞墽琛?#28051;娆?#37813;鏈夌殑?#31092;璇?#37510;? <h3 id="43-娣?#37716;?#37831;村?#27693;祴璇?7">4.3 娣?#37716;?#37831;村?#27693;祴璇?7</h3> <li>缂?#37712;?#28051;涓祴璇?#39582;?#26473;?#29723;岃?#38155;潵锛屽杩囧?#21976;墍鏈夌殑?#31092;璇曠紪濂?#27996;?#28051;璧?#26473;?#29723;?#37510;? <li>?#31092;璇曠壒鍒渶瑕佹敞鎰忓彲?#20824;?#22189;?#25930;?#27537;杈圭?#23678;潯浠?#38171;? <li>瀵?#27996;庡彲?#20824;?#22189;?#25930;?#27537;鍦版柟锛?#26473;橀渶瑕佹?#29025;鏄?#37722;?#37814;涘嚭浜?#26864;?#37832;熺殑寮傚父锛? <li>?#31092;璇?#28051;嶈兘瑙?#37712;?#37813;鏈塨ug锛屼?#21976;槸鍙互澶?#28598;?#37713;忓皯bug?#27537;鏁?#38322;?#37510;?</li></ul> <h2 id="绗?2绔?澶瀷閲?#37835;?59">绗?2绔?澶瀷閲?#37835;?59</h2> <p>澶瀷閲?#37835;?#37828;?#32459;?#25652;忓紑?#24386;蹇呭皢閬囧埌?#27537;锛屽彧鏄?#28051;嶇煡閬?#37734;?#28000;涔堟椂闂?#38171;?#37922;?#28000;涔?#37837;风殑鏂?#23534;忕?#24531;巻銆?#28186;嬪锛氶殢鐫?#26882;闂寸殑鎺?#32457;?#38171;?#23052;?#38316;?#36423;?#28729;?#28028;氳姘磋?#22794;?#23677;瀮鍦炬墍鍫靛锛屼?#29362;彲?#20114;鍥?#28729;氭椂闂存竻娣?#38171;屼篃鍙互鏀?#28000;昏嚜娴?#37929;村埌宕?#23143;?#37510;傚穿婧?#37722;?#28186;?#37906;朵細?#28528;涓存荤粨缁忛獙鏁?#29825;?#38171;屽?#23942;閲?#37835;?#32495;荤粺銆?<br>澶瀷閲?#37835;勫緢?#27622;缁欏嚭鍏?#28003;撶殑鎿?#28003;?#22935;?#28186;?#38171;屽洜涓烘瘡涓?#28598;?#37736;嬫渚?#37929;?#28725;?#27996;庤嚜?#38889;鏉?#29831;撮兘鏄?#37807;?#28051;?#27537;锛?#37828;?#37827;犳硶澶?#37714;?#37724;?#38322;?#37916;扮殑銆?#37721;互澶?#37714;朵笌閲?#37916;扮殑?#20824;鏄?#26473;?#27996;?#28598;瀷閲?#37835;?#28051;?#38033;村惈?#27537;鍏?#28003;撶殑缁?#38010;?#38171;屽洜姝?#26473;?#32468;?#28051;?#29781;?#29825;茬殑鏄?#37804;濇兂鍜岀悊?#24247;涓婄殑鍐?#28729;?#37510;?<br>鍥?#28051;?#28598;瀷閲?#37835;?#38171;?/p> <ul> <li>Tease Apart Inheritance锛?62锛?#37922;?#27996;?#28598;勭悊娣?#28052;辩殑缁?#37813;?#28003;?#32495;? <ul> <li>?#28999;涓?#32513;?#37813;?#28003;?#32495;?#37722;屾椂鎵?#37815;?#28051;?#26916;?#29840;?#28000;? <li>?#32531;绔?#28051;?#28051;?#32513;?#37813;?#28003;?#32495;?#38171;?#37711;朵腑涓涓?#38315;?#26473;囧鎵樿皟鐢?#37721;?#28051;涓?</li></ul> <li>Convert Procedural Design to Objects锛?68锛夊浣?#38322;?#37835;?#26473;囨椂?#27537;缂栫爜鎶鏈?#38316;楃暀涓嬫潵?#27537;绋?#25652;? <ul> <li>浼犵粺杩囩?#23338;?#26669;鏍肩殑浠爜 <li>灏?#37825;版嵁璁板綍鍙?#37812;?#28725;硅薄锛屽皢澶?#37735;楃殑琛?#28051;?#37714;嗘垚灏忓潡锛屽啀灏?#28729;冧滑绉?#37711;埌鐩?#37711;?#28725;硅薄涓?</li></ul> <li>Separate Domain from Presentation锛?70锛夊皢涓氬姟閫昏緫涓?#37922;?#37812;?#37923;岄潰鍒嗛殧寮鏉? <ul> <li>鐢?#37812;?#37923;岄潰绫?#28051;?#37718;?#37722;?#27996;?#28051;氬姟閫昏緫 <li>灏?#28051;氬姟閫昏?#25117;绂诲埌涓氬姟绫?#28051;?#38171;屽弬鑰?#38171;MVC妯?#23534;?</li></ul> <li>Extract Hierarchy锛?75锛夊皢澶嶆潅?#27537;绫?#26462;?#37718;?#28051;?#28051;缇?#32480;鍗曠殑?#29913;绫?#38171;屼粠鑰?#32480;鍖?#32495;荤粺銆? <ul> <li>?#28999;涓?#32491;诲仛浜?#28598;?#28598;?#23480;?#28003;? <li>?#28999;涓?#32491;荤殑閮?#37714;?#23480;?#28003;?#37828;?#37922;?#28598;?#38322;忕殑鏉?#28000;?#29723;?#26440;惧?#24531;?#23678;?#24878;殑 <li>?#32531;绔?#32513;?#37813;?#28003;?#32495;?#38171;屼娇鐢瓙绫?#29723;?#32448;烘瘡涓绉嶇?#35268;?#23107;?#21613;喌 </li></ul></li></ul> <h2 id="绗?3绔?閲?#37835;勫鐢?#28051;?#37916;?#28729;?79">绗?3绔?閲?#37835;?#38171;屽鐢?#28051;?#37916;?#28729;?79</h2> <p>浣?#28051;?#28051;涓?#37719;氬鍐欑殑鍐?#28729;?#38171;屼粛鐒?#37711;?#37832;夊鏈?#37804;緝寮虹殑椋?#37837;?#38171;屽彲?#20114;褰?#28003;滃巻鍙?#29863;?#37826;?#27996;嗚涓涓?#38322;?#37835;勭殑?#24386;灞?#26473;囩锛屼篃鍙互瀵?#38322;?#37835;勭殑鎬濇兂鏈?#37831;村?#27697;悊璁?#28051;婄殑璁?#29831;?#37510;?/p> <h3 id="瀹?#37711;?#38322;?#37835;?91">瀹?#37711;?#38322;?#37835;?#38171;?91锛?/h3> <p>瀹?#37711;?#38322;?#37835;勭殑鍥涙潯绡辩锛?/p> <ul> <li>鐩?#28103;?#28003;犺嚜宸辩殑缂栫爜?#20824;鍔?#38171;? <li>鐩?#28103;?#28003;犵殑缂?#29831;戝櫒?#20824;鎹?#37817;?#28003;?#38316;?#23125;忕殑?#25930;璇?#38171;? <li>鐩?#28103;?#28003;犵殑?#31092;璇?#28610;?#28000;惰兘鎹?#37817;?#28003;犲拰缂?#29831;戝櫒?#20824;閬?#23125;忕殑?#25930;璇?#38171;? <li>鐩?#28103;?#28000;爜澶?#28729;兘鎹?#37817;?#28003;?#37510;?#32514;?#29831;戝櫒鍜屾祴璇?#28610;?#28000;堕兘閬?#23125;忕殑?#25930;璇?#37510;傛敞锛?#23052;?#37832;?00%瀹?#37711;殑閲?#37835;?#38171;屼?#21976;槸鍙互閫?#26473;囦互涓婄殑鏉?#28000;舵弧瓒?#28003;犲瀹?#37711;?#37804;殑鏈浣?#29781;佹眰銆?</li></ul> <h3 id="閲?#37835;勫伐鍏?>閲?#37835;勫伐鍏?/h3> <ul> <li>Eclipse锛堟垨鍏朵粬IDE锛夎嚜甯殑閲?#37835;勫伐鍏?#38171;歊efactor锛? <li>Java锛堟垨鍏朵粬缂?#29831;戝櫒锛夎嚜甯殑鍒嗘瀽宸?#37711;?#38171;lint锛? <li>JUnit绛夎嚜鍔?#37718;栫殑?#31092;璇?#23480;?#37711;?#37510;?</li></ul> <h2 id="绗?4绔?閲?#37835;勫伐鍏?01">绗?4绔?閲?#37835;勫伐鍏?01</h2> <p>鐩?#28725;?#27996;?0澶?#39582;村墠鍐欑殑鍐?#28729;?#38171;?#37916;?#37734;?#29825;?#28598;欼DE?#20824;宸?#32513;忔彁渚?#27996;嗗澶?#38318;?#37714;?#38322;?#37835;勫?#29115;兘?#27537;鏀?#37816;?#37510;?#28003;嗘槸浜嗚閲?#37835;勭殑鍩?#37832;悊?#24247;锛屽浜?#23005;?#32429;?#37734;颁娇鐢?#38322;?#37835;勫伐鍏蜂細鏈夊緢澶殑甯?#37716;?#37510;傚洜涓烘垚鍔熺殑閲?#37835;?#28051;?#28186;濊禆浜?#23480;?#37711;?#38171;?#38000;屽喅瀹?#27996;?#27996;?#38171;屽綋浜哄仛?#22189;浜嗘纭殑鍐?#28729;?#38171;屽?#22562;悊鍦颁娇鐢?#38322;?#37835;勫伐鍏?#26440;呭姪?#22172;宸?#38171;屾墠?#20824;淇?#29831;?#38322;?#37835;勭殑瀹屾垚銆?/p> </li><img src ="http://www.67529968.com/zhuyuanxiang/aggbug/433604.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-16 17:48 <a href="http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433604.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>銆?#38322;?#37835;?#37510;嬬殑璇?#28052;?#38322;?#37904;?/title><link>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433603.html</link><dc:creator>鏈?#26473;?#32520;?/dc:creator><author>鏈?#26473;?#32520;?/author><pubDate>Wed, 16 Jan 2019 09:46:00 GMT</pubDate><guid>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433603.html</guid><wfw:comment>http://www.67529968.com/zhuyuanxiang/comments/433603.html</wfw:comment><comments>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433603.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/zhuyuanxiang/comments/commentRss/433603.html</wfw:commentRss><trackback:ping>http://www.67529968.com/zhuyuanxiang/services/trackbacks/433603.html</trackback:ping><description><![CDATA[<h2 id="閲?#37835;勭殑鍘熷洜">閲?#37835;勭殑鍘熷洜锛?/h2> <ul> <li>鏀瑰?#21230;蒋浠剁殑璁?#29825;?#23000;?#39582;?#38171;? <li>?#23047;杞?#28000;?#37831;村?#29362;鏄?#29722;悊瑙?#38171;? <li>?#23047;杞?#28000;?#37831;村?#29362;鏄?#28725;?#37813;鹃敊璇?#38171;? <li>?#23047;杞?#28000;?#23534;?#24386;閫?#25652;?#37831;村揩锛? <li>?#23047;杞?#28000;朵唬?#29212;鏇村缁?#37814;?#37510;?</li></ul> <h2 id="閲?#37835;勭殑?#26882;闂?>閲?#37835;勭殑?#26882;闂?#38171;?/h2> <ul> <li>澧炲?#29362;嚱鏁扮殑?#26882;鍊?#38322;?#37835;?#38171;? <li>淇?#37824;归敊璇殑?#26882;鍊?#38322;?#37835;?#38171;? <li>浠爜瀹煡?#27537;?#26882;鍊?#38322;?#37835;?#37510;?</li></ul> <h2 id="閲?#37835;勭殑涓?#29781;?#37826;规硶">閲?#37835;勭殑涓?#29781;?#37826;规硶</h2> <ul> <li>Extract/Inline <ul> <li>Method <li>Class <ul> <li>Subclass <li>Superclass <li>Interface </li></ul> <li>Hierarchy </li></ul> <li>Move <ul> <li>Field <li>Method <li>Variable </li></ul> <li>Rename <ul> <li>Method <li>Variable <li>Class </li></ul> <li>Pull Up <ul> <li>Field <li>Method <li>Constructor Body </li></ul> <li>Push Down <ul> <li>Field <li>Method <li>Constructor Body </li></ul></li></ul> <h2 id="閲?#37835;勭殑宸?#37711;?>閲?#37835;勭殑宸?#37711;?/h2> <ul> <li>IDE?#24385;渚?#27996;嗚嚜鍔?#37718;栫殑浠爜閲?#37835;勫伐鍏?#38171;? <li>JUnit?#24385;渚?#27996;嗚嚜鍔?#37718;栫殑?#31092;璇曟?#21976;灦锛? <li>璁?#29825;?#22959;?#23534;忔彁渚?#27996;?#38322;?#37835;勭殑鏂?#37722;?#38171;? <li>鏋侀檺缂?#32459;嬫彁渚?#27996;?#28729;?#37825;寸殑寮?#24386;杩囩锛屽寘鎷?#38171;?#32513;?#38339;熺紪绋?#37510;佽嚜鍔?#37718;栨祴璇?#37510;佷唬?#29212;瀹煡銆?#37721;婃椂鍙嶉銆佷唬?#29212;閲?#37835;勭?#22796;瓑銆?</li></ul><img src ="http://www.67529968.com/zhuyuanxiang/aggbug/433603.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-16 17:46 <a href="http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433603.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>銆?#38322;?#37835;?#37510;嬬殑璇?#37722;?#37808;?/title><link>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433602.html</link><dc:creator>鏈?#26473;?#32520;?/dc:creator><author>鏈?#26473;?#32520;?/author><pubDate>Wed, 16 Jan 2019 09:43:00 GMT</pubDate><guid>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433602.html</guid><wfw:comment>http://www.67529968.com/zhuyuanxiang/comments/433602.html</wfw:comment><comments>http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433602.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/zhuyuanxiang/comments/commentRss/433602.html</wfw:commentRss><trackback:ping>http://www.67529968.com/zhuyuanxiang/services/trackbacks/433602.html</trackback:ping><description><![CDATA[<h2 id="閲?#37835;?#37828;?#37832;?#28610;?#28052;?>閲?#37835;?#37828;?#37832;?#28610;?#28052;?/h2> <p>浣?#38000;呬紭绉锛屼綔鍝佷紭绉锛?#32520;?#29831;戜篃寰堜紭绉銆?#28003;嗘槸锛屾棤璁?#28598;?#28052;?#28610;界殑缈?#29831;戜篃鏃犳硶瀹?#37825;翠紶杈?#28003;?#38000;呯殑鍘熸剰銆傚洜姝?#38171;?#29831;?#28052;嬪墠鏈濂藉噯澶?#38011;?#37826;囧拰涓?#37826;?#28051;?#28051;?#37911;?#37832;?#38171;?#28051;?#37826;?#29831;?#28051;嶆?#20636;殑鍦版柟灏?#37817;?#38011;?#37826;?#38171;岃嫳鏂?#29831;荤殑绱殑鍦版柟灏?#37817;?#28051;?#37826;?#37510;?#37711;?#37714;?#37714;?#37922;嚜宸?#37734;?#28051;?#32457;?#29831;?#29815;涓婄煡璇嗗偍澶?#38171;屽彲?#20114;?#23047;璇?#26473;?#37832;?#28052;?#27996;?#37922;?#27996;?#37719;?#37716;?#37706;嶇殑鏁?#37835;?#37510;?/p> <h2 id="閲?#37835;?#37828;?#37922;遍渶?#30512;椹?#37716;殑">閲?#37835;?#37828;?#37922;遍渶?#30512;椹?#37716;殑</h2> <p>涓轰粈涔堣閲?#37835;?#38171;?#28051;?#28000;?#28000;?#37828;?#28051;?#27996;烘垨鍥?#28003;撶殑鍠?#28610;?#38171;?#37808;熸?#26937;?#37716;?#38171;?#38171;?#26473;樺簲璇?#37828;?#37922;?#28729;?#37812;风殑?#28214;?#30512;鍙?#37831;村鑷撮鐩?#26473;?#28000;嚭鐜?#37733;伴毦锛?#38000;?#38322;?#37835;勬鏄?#29785;?#37712;?#37733;伴毦?#27537;濂藉?#28852;硶,浜?#37828;?#37818;?#37716;?#38322;?#37835;?#38171;堢悊鎬?#26937;?#37716;?#38171;?#37510;?/p> <p>褰撶劧锛屼綔涓?#38322;?#37835;勫垰鍒?#37711;?#38338;殑绋?#25652;忓憳涓瀹氫細?#22476;澶勪娇鐢?#26473;?#28051;?#28598;?#37833;鍣?#38171;屼?#21976;槸?#27554;鐫鎶鏈?#37724;?#32513;忛?#23680;殑鎴?#37908;?#38171;屽簲璇?#29863;?#37722;?#26916;?#25652;渶?#30512;?#27537;閲?#37835;?#38171;屾弧瓒?#28729;?#37812;烽渶?#30512;?#22688;鏄?#26916;?#37929;殑鏍?#37832;?#37510;?/p> <h2 id="閲?#37835;勮鏈?#37711;?#28003;撶殑鐩?#37837;?>閲?#37835;勮鏈?#37711;?#28003;撶殑鐩?#37837;?/h2> <p>鐩?#37837;?#37828;庣锛?#37815;?#32513;?#29831;辨儜銆?#38322;?#37835;勭殑杩囩涔?#37828;?#37908;熸倝涓氬姟?#27537;杩囩锛屾?#29025;?#25930;璇殑杩囩</p> <h2 id="閲?#37835;勮鎶?#28598;?#37929;?#37837;囧?#21978;鎴?#29825;?#28598;?#28051;皬鐩?#37837;?>閲?#37835;勮鎶?#28598;?#37929;?#37837;囧?#21978;鎴?#29825;?#28598;?#28051;皬鐩?#37837;?/h2> <ul> <li>鍥?#28051;烘瘡涓皬鐩?#37837;囨墠涓嶄?#27699;?#21613;嚭?#22172;宸辩殑鎺?#37714;惰兘鍔?#38171;屽嚭鐜伴敊璇?#37722;?#28052;?#37831;村鏄?#37733;?#38315;銆? <li>閲?#37835;勭殑?#30241;涓皬鐩?#37837;?#37832;濂借兘澶?#37711;?#28598;?#37832;?#37825;?#37734;版?#31092;鏈?#37714;? <li>閲?#37835;勭殑澶?#37929;?#37837;囧繀椤绘彁渚涙?#29529;鏈?#37714;?</li></ul> <h2 id="閲?#37835;?#37832;濂借兘?#23047;鐢gitjunit绛夌?#22794;?#30028;殑閲?#37835;勫伐鍏?#26440;呭姪">閲?#37835;?#37832;濂借兘?#23047;鐢GIT銆丣Unit绛夌?#22794;?#30028;殑閲?#37835;勫伐鍏?#26440;呭姪</h2> <p>鐔熸倝閲?#37835;勭殑?#24714;璁虹煡璇?#38171;屽杽鐢?#38322;?#37835;勭殑宸?#37711;?#37510;?#28725;?#27996;?#23480;?#37711;风殑?#24714;瑙?#37721;?#37721;?#38000;?a href="https://zhuyuanxiang.github.io/thinking/%E5%B7%A5%E5%85%B7%E7%9A%84%E6%84%8F%E4%B9%89/">銆?#23480;?#37711;风殑鎰?#28052;?#37510;?/a></p><img src ="http://www.67529968.com/zhuyuanxiang/aggbug/433602.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-16 17:43 <a href="http://www.67529968.com/zhuyuanxiang/archive/2019/01/16/433602.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>Windows7涓媍hm鏂?#28000;舵墦涓?#23534;http://www.67529968.com/zhuyuanxiang/archive/2019/01/15/433599.html鏈?#26473;?#32520;?/dc:creator>鏈?#26473;?#32520;?/author>Tue, 15 Jan 2019 04:05:00 GMThttp://www.67529968.com/zhuyuanxiang/archive/2019/01/15/433599.htmlhttp://www.67529968.com/zhuyuanxiang/comments/433599.htmlhttp://www.67529968.com/zhuyuanxiang/archive/2019/01/15/433599.html#Feedback0http://www.67529968.com/zhuyuanxiang/comments/commentRss/433599.htmlhttp://www.67529968.com/zhuyuanxiang/services/trackbacks/433599.html浠庣綉涓?#28051;?#26462;界殑CHM鏂?#28000;?#37734;Windows7绯荤粺涓?#37827;犳硶鏄?#32448;?#37712;?#28729;?#38171;?#37828;?#37733;?#28051;篧indows7绯荤粺涓殑娴?#29785;堝櫒涓?#26462;界殑鏂?#28000;?#37828;?#29722;粯璁?#28051;洪攣瀹氱殑锛屾墍?#20114;鎵?#23534;?#20114;鍚?#37828;?#37827;犳硶鏄?#32448;?#38322;岄潰?#27537;鍏?#28003;?#37712;?#28729;圭殑锛?#29785;?#37712;崇殑鍔炴硶锛?/p>
      • 閫?#28051;?#26473;?#28051;CHM鏂?#28000;?#38171;?
      • 鐐?#37721;抽敭锛岄?#37815;?#37413;?#28766;?#37804;?#37413;?#38171;屽湪鈥滃父瑙?#37413;濇?#22249;?#28844;?#24533;殑鏈涓嬮潰锛?#37832;?#28051;?#37413;?#29785;櫎閿?#28729;?#37413;濈殑鎸夐挳锛?#37904;瑰?#35763;互鍚?
      • 鍐嶆?#29238;鎵?#23534;chm鏂?#28000;?#28751;?#37721;互娴?#29785;堝埌閲岄潰?#27537;鍐?#28729;?#27996;?#37510;?/li>


      鏈?#26473;?#32520;?/a> 2019-01-15 12:05 鍙戣璇?#29825;?/a>
      ]]>鐖?#28610;囪壓鎶鏈?#37714;?#27996;?#38171;氱埍濂囪?#31688;ndroid瀹?#37812;?#32468;?#37722;?#37716;?#38315;?#25652;?#28028;樺寲瀹?#29882;?#37804;荤粨http://www.67529968.com/jb2011/archive/2019/01/14/433598.htmlJack JiangJack JiangMon, 14 Jan 2019 03:53:00 GMThttp://www.67529968.com/jb2011/archive/2019/01/14/433598.htmlhttp://www.67529968.com/jb2011/comments/433598.htmlhttp://www.67529968.com/jb2011/archive/2019/01/14/433598.html#Feedback0http://www.67529968.com/jb2011/comments/commentRss/433598.htmlhttp://www.67529968.com/jb2011/services/trackbacks/433598.html闃?#29831;?#37711;?#37826;?/a>

      Jack Jiang 2019-01-14 11:53 鍙戣璇?#29825;?/a>
      ]]>Android绋?#25652;忓?#27194;?#21615;煡蹇呬細?#27537;缃戠粶閫?#28103;?#28028;犺緭?#30512;鍗?#29825;?#37413;?#37413;擴DP鍜孴CPhttp://www.67529968.com/jb2011/archive/2019/01/10/433591.htmlJack JiangJack JiangThu, 10 Jan 2019 03:15:00 GMThttp://www.67529968.com/jb2011/archive/2019/01/10/433591.htmlhttp://www.67529968.com/jb2011/comments/433591.htmlhttp://www.67529968.com/jb2011/archive/2019/01/10/433591.html#Feedback0http://www.67529968.com/jb2011/comments/commentRss/433591.htmlhttp://www.67529968.com/jb2011/services/trackbacks/433591.html闃?#29831;?#37711;?#37826;?/a>

      Jack Jiang 2019-01-10 11:15 鍙戣璇?#29825;?/a>
      ]]>鍏潰瑙瘑QQ绾?#37718;?#37814;鏈?#37826;规锛?#37835;舵瀯銆?#37814;鏈?#28729;?#37916;?#37510;佺鍔?#32468;?#28028;樺寲銆?#37714;涙柊鐜硶?#29905;http://www.67529968.com/jb2011/archive/2019/01/07/433586.htmlJack JiangJack JiangMon, 07 Jan 2019 04:10:00 GMThttp://www.67529968.com/jb2011/archive/2019/01/07/433586.htmlhttp://www.67529968.com/jb2011/comments/433586.htmlhttp://www.67529968.com/jb2011/archive/2019/01/07/433586.html#Feedback0http://www.67529968.com/jb2011/comments/commentRss/433586.htmlhttp://www.67529968.com/jb2011/services/trackbacks/433586.html闃?#29831;?#37711;?#37826;?/a>

      Jack Jiang 2019-01-07 12:10 鍙戣璇?#29825;?/a>
      ]]>缇庡浘App?#27537;绉?#37716;?#32468;疍NS浼樺寲瀹?#29882;?#38171;欻TTPS璇锋眰鑰楁椂鍑忓皬杩?#37719;?/title><link>http://www.67529968.com/jb2011/archive/2018/12/25/433560.html</link><dc:creator>Jack Jiang</dc:creator><author>Jack Jiang</author><pubDate>Tue, 25 Dec 2018 08:30:00 GMT</pubDate><guid>http://www.67529968.com/jb2011/archive/2018/12/25/433560.html</guid><wfw:comment>http://www.67529968.com/jb2011/comments/433560.html</wfw:comment><comments>http://www.67529968.com/jb2011/archive/2018/12/25/433560.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/jb2011/comments/commentRss/433560.html</wfw:commentRss><trackback:ping>http://www.67529968.com/jb2011/services/trackbacks/433560.html</trackback:ping><description><![CDATA[     鎽樿: 鏈?#37826;囧紩鐢?#27996;?#26864;?#37722;戠兢鍙戣浜?#26946;?#37721;?#37922;?#37835;舵瀯鍏紬鍙?#28051;婄殑鏂?#32468;?#37510;婅?#23109;亰HTTPS鐜?#28583;DNS浼樺寲锛氱?#24225;浘App璇锋眰鑰楁椂鑺傜害杩?#37719;婃渚?#37510;嬬殑閮?#37714;?#37712;?#28729;?#38171;屾劅璋?#37720;熶綔鑰?#37510;?銆?#23534;?#29815;绉?#37716;?#27996;?#38001;旂綉鏃朵唬锛孉PP 鍘傚?#21973;箣闂寸殑绔?#27996;?#38344;炲父?#32314;鐑?#38171;?#38000;岃壇濂界殑鐢?#37812;?#28003;撻獙鏄?#36423;?#26916;讳紭鍏?#38000;冭?#25120;殑锛岀?#24225;浘浜?#37725;佷互楂?#26864;?#37706;艰憲绉?#38171;屽浜?#37725;佺殑鐢?#37812;?#28003;?#26976;岄?#28850;父閲?#29785;?#37510;?#28000;?#37814;鏈殑瑙?#25652;?#37833;湅锛屽鎴?#32468;殑浣?#26976;屼?#27194;?#26663;綋涓?DNS 浼樺寲鏄?#38344;炲父鍏抽敭?#27537;涓鐜?#38171;屾?#28052;堥檷浣?DNS ?#27537;鑰楁椂銆佹?#28052;堝?#24531;?#25117;煙鍚嶅鎸佺瓑闂?#26864;?#38171;岄兘鏄?#28598;?#28729;?..  <a href='http://www.67529968.com/jb2011/archive/2018/12/25/433560.html'>闃?#29831;?#37711;?#37826;?/a><img src ="http://www.67529968.com/jb2011/aggbug/433560.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/jb2011/" target="_blank">Jack Jiang</a> 2018-12-25 16:30 <a href="http://www.67529968.com/jb2011/archive/2018/12/25/433560.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>Android绔疘M搴?#37922;?#28051;殑@浜?#37716;熻兘瀹?#37916;?#38171;?#28000;垮井鍗?#37510;丵Q銆?#23536;?#28103;?#38171;岄浂鍏?#28186;?#37510;?#26946;?#37721;?#37813;?#28766;?/title><link>http://www.67529968.com/jb2011/archive/2018/12/23/433557.html</link><dc:creator>Jack Jiang</dc:creator><author>Jack Jiang</author><pubDate>Sun, 23 Dec 2018 13:31:00 GMT</pubDate><guid>http://www.67529968.com/jb2011/archive/2018/12/23/433557.html</guid><wfw:comment>http://www.67529968.com/jb2011/comments/433557.html</wfw:comment><comments>http://www.67529968.com/jb2011/archive/2018/12/23/433557.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/jb2011/comments/commentRss/433557.html</wfw:commentRss><trackback:ping>http://www.67529968.com/jb2011/services/trackbacks/433557.html</trackback:ping><description><![CDATA[     鎽樿: 鏈?#37826;?#37922;?#8220;鐚?#37910;iYao”鍘?#37714;?#37714;?#27996;?#38171;屾劅璋?#28003;?#38000;?#37510;?銆?#23534;?#29815;鏈杩?#37832;?#28051;渶?#30512;锛氳瘎璁@浜?#38171;?#23052;敊锛屽氨鏄疘M鑱?#28598;垨鑰?#23536;?#37719;欰PP閲岀殑@浜?#37716;熻兘锛?#38171;屽?#21342;涓嬪浘杩?#37837;?#38171;?#9650; 寰?#28103;?#32519;?#38001;婄?#23684;潰閲岀殑@浜?#37716;熻兘 ▲ QQ缇?#38001;婄?#23684;潰閲岀殑@浜?#37716;熻兘?#32137;涓?#23480;?#32513;?#37832;?#28051;浜?#37826;?#32468;犲垎浜?#27996;嗙?#35763;技鍔熻兘瀹?#37916;?#38315;昏緫锛屼?#21976;槸鍑?#28052;庨兘鏄?#37813;?#28766;旹ditText绫?#38171;?#26473;?#32457;?#28729;?#37916;版柟寮?#38002;?#28729;?#28051;嶈兘杩?#37711;?#37812;戠殑棣栧彂闃?#28729;?#37510;?#28003;犱互涓?#37828;?#37733;?#28051;?#28729;?#28051;?#32471;?#37722;堥潰鍚戝?#30789;薄鍏?#28598;?..  <a href='http://www.67529968.com/jb2011/archive/2018/12/23/433557.html'>闃?#29831;?#37711;?#37826;?/a><img src ="http://www.67529968.com/jb2011/aggbug/433557.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/jb2011/" target="_blank">Jack Jiang</a> 2018-12-23 21:31 <a href="http://www.67529968.com/jb2011/archive/2018/12/23/433557.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title> 浼?#32457;鍚?#32468;?#37835;舵?#21227;?#22557;?#21612;細?#29025;璇?#38171;?#37721;?#28051;?#37832;鍏MySQL澶?#29723;?#28028;樺寲鏂规鎬荤粨http://www.67529968.com/jb2011/archive/2018/12/17/433549.htmlJack JiangJack JiangMon, 17 Dec 2018 05:34:00 GMThttp://www.67529968.com/jb2011/archive/2018/12/17/433549.htmlhttp://www.67529968.com/jb2011/comments/433549.htmlhttp://www.67529968.com/jb2011/archive/2018/12/17/433549.html#Feedback0http://www.67529968.com/jb2011/comments/commentRss/433549.htmlhttp://www.67529968.com/jb2011/services/trackbacks/433549.html闃?#29831;?#37711;?#37826;?/a>

      Jack Jiang 2018-12-17 13:34 鍙戣璇?#29825;?/a>
      ]]> 杈捐揪O2O鍚庡?#29256;?#33333;?#21228;紨杩?#28729;?#29882;?#38171;?#28000;??#22476;4000楂?#39582;?#37721;戣?#38155;眰鑳屽?#24227;殑鍔?#37716;?/title><link>http://www.67529968.com/jb2011/archive/2018/12/10/433542.html</link><dc:creator>Jack Jiang</dc:creator><author>Jack Jiang</author><pubDate>Mon, 10 Dec 2018 11:32:00 GMT</pubDate><guid>http://www.67529968.com/jb2011/archive/2018/12/10/433542.html</guid><wfw:comment>http://www.67529968.com/jb2011/comments/433542.html</wfw:comment><comments>http://www.67529968.com/jb2011/archive/2018/12/10/433542.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/jb2011/comments/commentRss/433542.html</wfw:commentRss><trackback:ping>http://www.67529968.com/jb2011/services/trackbacks/433542.html</trackback:ping><description><![CDATA[     鎽樿: 1銆?#23534;?#29815;杈捐揪鍒?#32468;?#27996;?014骞?鏈?#38171;?#28051;氬姟瑕?#37929;?#37711;?#37733;?7涓?#37737;庡锛?#37815;?#37832;?30涓囨敞鍐屼紬鍖呴?#23945;佸憳锛屾棩?#28494;閰嶉佺櫨涓囧崟锛?#37828;?#37711;?#37733;?#26864;?#37711;堢殑鏈鍚?#28051;?#37711;?#38322;岀墿娴侀?#23945;?#39582;?#37721;?#37510;?杈捐揪?#27537;涓氬姟妯?#23534;?#28051;庢?#23384;?#32736;互鍙Uber寰?#37929;?#28028;?#38171;屼互?#32044;鍖呯殑鏂?#23534;忓埄鐢?#32448;句細闂?#37825;?#27996;?#37716;?#29863;勬簮锛?#29785;?#37712;砄2O鏈鍚?#28051;?#37711;?#38322;屽?#34411;椂鎬?#38320;嶉侀毦棰?#38171;?016骞?鏈?#38171;岃?#25424;揪宸?#32513;?#28051;?#27996;?#28051;滃埌瀹?#37722;?#39582;?#38171;?#37510;?nbsp;杈捐揪?#27537;涓氬姟缁勬垚绠鍗?#37929;存帴——鍟?#28729;朵笅鍗?#37510;侀?#23945;佸?#27195;帴鍗?#37724;岄?#23945;?#38171;屼?#29112;鍥?#28051;虹悊瑙?#29863;锋潵绠...  <a href='http://www.67529968.com/jb2011/archive/2018/12/10/433542.html'>闃?#29831;?#37711;?#37826;?/a><img src ="http://www.67529968.com/jb2011/aggbug/433542.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/jb2011/" target="_blank">Jack Jiang</a> 2018-12-10 19:32 <a href="http://www.67529968.com/jb2011/archive/2018/12/10/433542.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>鍏潰浜嗚绉?#37716;?#32468;疍NS?#29017;鍚嶅鎸?#32475;夋潅鐥?#38171;?#37720;熺悊銆佹?#35268;簮銆丠ttpDNS瑙?#37712;?#37826;规?#22562;瓑http://www.67529968.com/jb2011/archive/2018/12/04/433535.htmlJack JiangJack JiangTue, 04 Dec 2018 05:36:00 GMThttp://www.67529968.com/jb2011/archive/2018/12/04/433535.htmlhttp://www.67529968.com/jb2011/comments/433535.htmlhttp://www.67529968.com/jb2011/archive/2018/12/04/433535.html#Feedback0http://www.67529968.com/jb2011/comments/commentRss/433535.htmlhttp://www.67529968.com/jb2011/services/trackbacks/433535.html闃?#29831;?#37711;?#37826;?/a>

      Jack Jiang 2018-12-04 13:36 鍙戣璇?#29825;?/a>
      ]]>鐢JWT鎶鏈?#29785;?#37712;矷M绯荤粺Socket?#26289;杩炴帴?#27537;?#38889;浠?#29825;?#29831;佺鐐?/title><link>http://www.67529968.com/jb2011/archive/2018/11/28/433527.html</link><dc:creator>Jack Jiang</dc:creator><author>Jack Jiang</author><pubDate>Wed, 28 Nov 2018 04:28:00 GMT</pubDate><guid>http://www.67529968.com/jb2011/archive/2018/11/28/433527.html</guid><wfw:comment>http://www.67529968.com/jb2011/comments/433527.html</wfw:comment><comments>http://www.67529968.com/jb2011/archive/2018/11/28/433527.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/jb2011/comments/commentRss/433527.html</wfw:commentRss><trackback:ping>http://www.67529968.com/jb2011/services/trackbacks/433527.html</trackback:ping><description><![CDATA[     鎽樿: 1銆?#23534;?#29815;?#27554;鐫鐡滃瓙浜屾墜杞?#37929;?#37711;?#28051;氬姟?#27537;?#24386;灞?#38171;?#37711;?#37721;?#37832;夊涓?#28051;氬姟绾块兘?#24116;鍏?#27996;咺M绯荤粺锛孖M绯荤粺涓殑Socket?#26289;杩炴帴?#27537;瀹?#37711;?#38338;?#26864;?#37721;?#23536;楄?#23107;潵瓒?#38322;?#29781;?#37510;?#37832;?#23046;?#37714;?#27996;?#23005;?#37828;?#37737;?#27996;?#23005;?#23046;?#29785;?#37712;砈ocket?#26289;杩炴帴?#38889;浠藉畨鍏?#29825;?#29831;佺殑瀹?#29882;?#37804;荤粨鑰屾潵锛?#37826;规鍙兘骞朵笉瀹岀編锛屼?#21976;?#33007;兘璧峰埌鎶?#37934;?#23534;?#37916;夌殑浣?#37922;?#38171;屽笇鏈涜兘缁?#37806;殑IM绯荤粺寮?#24386;甯?#37833;?#37722;彂銆?#28699;?#28052;?#27996;?#23092;?#38171;? 鍗虫椂閫?#29825;?鎺?#38315;?#37814;鏈?#23534;?#24386;浜?#23092;?缇?#38171;?01279154[鎺?#38013;]- 绉?#37716;?#32468;疘M寮?#24386;鍏?#38338;?#37826;?#32468;?#38171;?#37510;?#37826;版墜鍏?#38338;?#28051;绡囧氨澶?#38171;?#28000;庨浂...  <a href='http://www.67529968.com/jb2011/archive/2018/11/28/433527.html'>闃?#29831;?#37711;?#37826;?/a><img src ="http://www.67529968.com/jb2011/aggbug/433527.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/jb2011/" target="_blank">Jack Jiang</a> 2018-11-28 12:28 <a href="http://www.67529968.com/jb2011/archive/2018/11/28/433527.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title> 鎶鏈?#39582;?#29840;?#38171;?#28000;庨浂寮濮?#38171;?#37825;?#28003;?#29825;?#29825;?#28051;涓櫨涓囩骇?#27537;娑堟伅鎺?#38315;?#32495;荤粺http://www.67529968.com/jb2011/archive/2018/11/27/433523.htmlJack JiangJack JiangTue, 27 Nov 2018 12:49:00 GMThttp://www.67529968.com/jb2011/archive/2018/11/27/433523.htmlhttp://www.67529968.com/jb2011/comments/433523.htmlhttp://www.67529968.com/jb2011/archive/2018/11/27/433523.html#Feedback0http://www.67529968.com/jb2011/comments/commentRss/433523.htmlhttp://www.67529968.com/jb2011/services/trackbacks/433523.html闃?#29831;?#37711;?#37826;?/a>

      Jack Jiang 2018-11-27 20:49 鍙戣璇?#29825;?/a>
      ]]>
      ͼͼֽӡˢ
      <optgroup id="iaykq"><small id="iaykq"></small></optgroup>
      <menu id="iaykq"></menu>
      <bdo id="iaykq"><nav id="iaykq"></nav></bdo>
    • <optgroup id="iaykq"><small id="iaykq"></small></optgroup>
      <menu id="iaykq"></menu>
      <bdo id="iaykq"><nav id="iaykq"></nav></bdo>