锘??xml version="1.0" encoding="utf-8" standalone="yes"?>BlogJava-鍏朵粬鎶鏈尯http://www.5432034.com/misc涓撴敞浜嶫ava鎶鏈?/description>zh-cnSat, 23 Mar 2019 12:20:55 GMTSat, 23 Mar 2019 12:20:55 GMT60浠垮井淇殑IM鑱婂鏃堕棿鏄剧鏍煎紡(鍚玦OS/Android/Web瀹炵幇)[鍥炬枃+婧愮爜]http://www.5432034.com/jb2011/archive/2019/02/23/433651.htmlJack JiangJack JiangSat, 23 Feb 2019 08:54:00 GMThttp://www.5432034.com/jb2011/archive/2019/02/23/433651.htmlhttp://www.5432034.com/jb2011/comments/433651.htmlhttp://www.5432034.com/jb2011/archive/2019/02/23/433651.html#Feedback0http://www.5432034.com/jb2011/comments/commentRss/433651.htmlhttp://www.5432034.com/jb2011/services/trackbacks/433651.html闃?#29831;?#37711;枃

Jack Jiang 2019-02-23 16:54 鍙戣璇勮
]]>
鏁寸悊浜?#37832;杩戠櫨骞寸殑钘忓巻鏁版嵁?#32029;鍋?#27996;?#28051;?#37711;巻钘忓巻鏄犲?#21229;殑灏忓伐鍏?/title><link>http://www.5432034.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.5432034.com/emu/archive/2019/01/30/433627.html</guid><wfw:comment>http://www.5432034.com/emu/comments/433627.html</wfw:comment><comments>http://www.5432034.com/emu/archive/2019/01/30/433627.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/emu/comments/commentRss/433627.html</wfw:commentRss><trackback:ping>http://www.5432034.com/emu/services/trackbacks/433627.html</trackback:ping><description><![CDATA[@import url(http://www.5432034.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 杩囧幓涓?#39582;?#28051;鐩?#38318;藉湪?#30241;骞?#38040;忓?#21976;?#26495;勾?#22688;璁炬硶鎷垮?#29256;柊涓骞寸殑钘忓巻鏁版嵁鏇存柊鍒拌嚜宸辩殑<a href="https://github.com/stonelf/zangli">涓涓猤ihub椤?#37929;?/a>閲岄潰?#32029;浠婂勾涓?#26473;戣?#24531;?#21976;?#26495;勾?#32029;鍗?#37721;戠幇浠?#23536;?#27537;寰?#28598;氳?#24531;巻缃戠珯閮?#23052;?#37832;?#37831;存柊鏄庡?#23544;殑鏁版嵁浜嗭紝姝?#28610;藉紕鍒?#27996;?#37832;杩?#28051;?#27368;骞寸殑钘忓巻鏁版嵁?#32029;鑺?#27996;嗙偣鏃堕棿鍏?#38318;?#38318;?#37831;存柊浜?#26473;涘幓?#32029;椤轰究<span style="caret-color: #444444; color: #444444; font-family: Tahoma, Arial, Helvetica, sans-serif; background-color: #ffffff;">鐢?#29831;?#27996;?#28051;涓?#26473;?#28051;嶉敊?#27537;?#29017;鍚?zangli.pro?#32029; </span>鍙?#29999;?#27996;?#28051;涓柊缃戠珯<a href="https://www.zangli.pro">?#27368;骞?#38040;忓巻</a>?#32029;鏂?#28186;垮瀹堕殢鏃舵煡璇?#37812;?#38000;呭湪?#22172;宸辩殑浜搧涓?#37929;存帴?#32041;?#25956;钘忓巻鍏巻?#27537;鎹?#32480;楄剼鏈?#37510;?img src ="http://www.5432034.com/emu/aggbug/433627.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/emu/" target="_blank">emu</a> 2019-01-30 13:34 <a href="http://www.5432034.com/emu/archive/2019/01/30/433627.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title> ?#30380;?#32972;鎶鏈?#37714;?#27996;?#38171;氳瀵嗗皬?#32972;鎶喘绯荤粺鍗?#28051;?#26946;?#39582;?#37721;戞?#33333;?#21229;殑婕?#26473;涘拰瀹?#29882;?/title><link>http://www.5432034.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.5432034.com/jb2011/archive/2019/01/24/433621.html</guid><wfw:comment>http://www.5432034.com/jb2011/comments/433621.html</wfw:comment><comments>http://www.5432034.com/jb2011/archive/2019/01/24/433621.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/jb2011/comments/commentRss/433621.html</wfw:commentRss><trackback:ping>http://www.5432034.com/jb2011/services/trackbacks/433621.html</trackback:ping><description><![CDATA[     鎽樿: 鏈枃?#24107;?#26499;鍐?#28729;瑰紩?#25956;?#22172;楂?#37721;敤鏋舵瀯鍏?#28028;?#37721;凤紝鍐?#28729;?#37832;?#37825;寸悊鍜?#28103;?#29825;?#37510;?銆佸紩瑷澶?#28729;?#28725;?#28051;嬮潰杩?#28051;帓闃熺殑鍦烘櫙搴?#29831;?#38344;炲父鐔熸倝?#32029;杩?#28051;?#37828;皬绫虫墜鏈?#37814;喘?#27537;?#25956;鎴锋帓闃?#27996;?#27996;?#37733;撅紝澶?#28729;剁湅鍒?#26473;?#27996;涙帓闃熺殑鍏斿瓙鏃讹紝璇?#37828;?#28052;?#37832;夊緢澶氱敤鎴峰湪鍚?#28051;鏃堕棿鍚戝皬?#32972;鎶喘绯荤粺?#24385;浜?#27996;嗚喘涔?#29831;锋眰銆?#9650; ?#30380;绫虫墜鏈?#37814;喘?#24083;闃?#28051;?..?#30380;?#32972;鎶喘绯荤粺鍚?#32468;?#37832;嶅姟?#28528;涓?#23480;?#28598;殑鍘?#37716;涳紝涓?#37733;惧彲浠?#37721;?#37828;犲皬?#32972;鎶喘绯荤粺?#28528;涓寸殑?#28763;?#26879;板煎帇鍔?#37510;?#26473;?#23534;?#37733;炬埅鍙栬嚜?#28999;骞寸背绮?#38010;?#28598;?#32457;?#37832;嶅姟鍚?#32468;?#37711;朵腑涓缁凩B锛?#29840;?#26462;藉潎琛?#28766;傦?#22796;殑...  <a href='http://www.5432034.com/jb2011/archive/2019/01/24/433621.html'>闃?#29831;?#37711;枃</a><img src ="http://www.5432034.com/jb2011/aggbug/433621.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/jb2011/" target="_blank">Jack Jiang</a> 2019-01-24 20:27 <a href="http://www.5432034.com/jb2011/archive/2019/01/24/433621.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>銆婃祴璇曢鍔?#23534;鍙?#37510;嬬殑璇?#28052;?#32471;?#29825;?/title><link>http://www.5432034.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.5432034.com/zhuyuanxiang/archive/2019/01/18/433616.html</guid><wfw:comment>http://www.5432034.com/zhuyuanxiang/comments/433616.html</wfw:comment><comments>http://www.5432034.com/zhuyuanxiang/archive/2019/01/18/433616.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/zhuyuanxiang/comments/commentRss/433616.html</wfw:commentRss><trackback:ping>http://www.5432034.com/zhuyuanxiang/services/trackbacks/433616.html</trackback:ping><description><![CDATA[<li><a href="#?#31092;璇曢鍔?#23534;鍙戠殑璇?#28052;?#32471;?#29825;?>銆婃祴璇曢鍔?#23534;鍙?#37510;嬬殑璇?#28052;?#32471;?#29825;?/a> <ul> <li><a href="#瀛?#28052;犲?#34425;">瀛?#28052;犲?#34425;?#32048;</a> <li><a href="#瀛?#28052;?#26473;囩">瀛?#28052;?#26473;囩?#23350;細</a> <li><a href="#瀛?#28052;犵洰?#27537;">瀛?#28052;犵洰?#27537;?#32048;</a> <li><a href="#瀛?#28052;?#37808;熸偀">瀛?#28052;?#37808;熸偀?#32048;</a> <li><a href="#瀛?#28052;?#28000;爜">瀛?#28052;?#28000;爜?#32048;</a> </li></ul> <li><a href="#?#31092;璇曢鍔?#23534;鍙戠殑瑙?#37714;?>?#31092;璇曢鍔?#23534;鍙戠殑瑙?#37714;?/a> <li><a href="#?#31092;璇曠搴?#23534;鍙戝懆鏈熺殑闃舵">?#31092;璇曠搴?#23534;鍙戝懆鏈熺殑闃舵</a> <ul></ul></nav></aside> <h2 id="?#31092;璇曢鍔?#23534;鍙戠殑璇?#28052;?#32471;?#29825;?>銆婃祴璇曢鍔?#23534;鍙?#37510;嬬殑璇?#28052;?#32471;?#29825;?/h2> <h3 id="瀛?#28052;犲?#34425;">瀛?#28052;犲?#34425;?#32048;</h3> <p>鐔熸倝銆?#29825;?#29825;?#22959;紡銆嬬殑鍩?#37832;?#22994;傚康?#32029;鐔熸倝銆?#38322;?#37835;勩嬬殑鍩?#37832;?#22994;傚康?#32029;鐔熸?#22794;熀鏈殑Java璇硶?#32029;鐔熸倝Eclipse鍜孞Unit?#27537;浣跨敤?#32029;鏈夌浉瀵硅緝濂界殑鑻?#29831;?#37737;虹銆?/p> <h3 id="瀛?#28052;?#26473;囩">瀛?#28052;?#26473;囩?#23350;細</h3> <ul> <li>绗?閮?#37714;嗭紝鎵?#23480;緭鍏?#28729;?#28186;嬬搴忥紝浜?#29785;TDD?#27537;鏂规硶鍜?#26473;囩銆傞噸鐐?#37828;悊瑙TDD?#27537;鎬?#29882;紝鏈濂界殑?#24714;瑙?#37826;瑰紡灏?#37828;?#38315;氳繃瀹?#29882;电殑鏂瑰紡?#24714;瑙?#37510;? <li>绗?閮?#37714;嗭紝鏁?#28003;犲浣曠敤Python瀹炵幇涓涓?#32471;?#37722;坸Unit?#27537;?#31092;璇曟?#21976;灦銆? <li>绗?閮?#37714;嗭紝TDD?#27537;妯紡?#32029;杩?#27996;涙?#32033;灞曠幇TDD濡?#28003;?#28051;?#37711;朵粬閲?#29781;?#37804;濇兂锛?#28186;嬪?#20646;?#27699;璁?#22959;紡銆?#38322;?#37835;勭?#22796;瓑锛?#28051;璧?#23480;?#28003;滅殑銆?</li></ul> <h3 id="瀛?#28052;犵洰?#27537;">瀛?#28052;犵洰?#27537;?#32048;</h3> <p>缂?#37712;欐纭殑浠爜銆?/p> <h3 id="瀛?#28052;?#37808;熸偀">瀛?#28052;?#37808;熸偀?#32048;</h3> <ul> <li>閬撶悊寰堢畝鍗曪紝鎿?#28003;?#28052;熷緢?#30045;鍗曪紝浣?#37828;?#37812;?#28000;?#37906;?#37827;犳硶鏄?#27996;?#28003;?#38000;呰澶?#38322;?#37835;勬搷浣滅殑鎰?#37733;撅紝鍙?#37828;?#37808;?#29785;?#28003;?#38000;?#37721;?#38003;?#37828;?#28000;?#37929;?#29785;夊?#21700;彂鍐欏嚭浠爜?#32029;鍐?#38315;氳繃閲?#37835;勬帹杩涙祴璇?#28000;爜涓?#27996;搧浠爜涔嬮棿?#27537;瑙?#38000;?#37510;傦紙?#29025;鍏剁?#35769;紝涓嶇煡鍏?#37813;浠?#37906;?#38171;? <li>鍙?#28000;?#37711;?#29882;?#26473;囩2閮?#37714;嗭紝浜?#29785;xUnit濡?#28003;?#28729;炵幇鍥虹?#22549;噸瑕侊紝浣?#37828;?#28051;?#23005;?#37721;?#37812;?#37711;堝Python灏?#37832;夌?#30789;窇棰?#27996;? <li>杩?#37721;?#28000;?#29882;?#26473;囩3閮?#37714;嗭紝杩?#38318;?#37714;?#38318;?#37828;?#28003;?#38000;?#28000;庢濇兂涓婂TDD?#27537;鎬?#32513;擄紝淇?#29831;?#29831;?#37413;?#28051;?#37722;?#27996;?#28051;?#23057;?#29825;版?#37413;濓紝绛夎嚜宸卞湪椤?#37929;?#28051;?#37722;?#28598;?#27996;?#27996;?#37712;嶆潵鍥?#26916;?#37714;?#27996;虹殑缁?#26976;岋紝鎵?#28028;氱湡姝?#37711;?#26982;?#37722;?#37510;?</li></ul> <h3 id="瀛?#28052;?#28000;爜">瀛?#28052;?#28000;爜?#32048;</h3> <p>浠爜寰堢畝鍗曪紝涓?#38343;瑕佸啀?#24385;渚涳紝鍙?#38000;?#37832;閲?#29781;佺殑鏄嚜宸?#28051;瀹氳鎵?#23480;?#29882;?#28051;閬嶏紝鍚?#37714;?#37827;犳硶棰?#28028;氫綔鑰呯殑鎰?#37733;?#37510;傝嚦灏戯紝鎴戝湪璞嗙摚涓婄湅浜嗗嚑涓?#29831;勮?#29492;紝澶?#38318;?#37714;?#38318;?#37828;?#37930;嬫噦浜嗭紝娌?#37808;?#29785;?#37510;?/p> <h2 id="?#31092;璇曢鍔?#23534;鍙戠殑瑙?#37714;?>?#31092;璇曢鍔?#23534;鍙戠殑瑙?#37714;?/h2> <ol> <li>锛圥4锛?#37828;庣璁?#29825;?#37929;?#37837;囷紝瀹屽?#21228;祴璇?#28000;爜 <ul> <li>娑堥櫎閲?#28598;?#29825;?#29825;?#37719;?#37828;?#23057;堥櫎渚濊禆鍏?#32495;?#38171;堟祴璇?#28000;爜涓?#27996;搧浠爜涔嬮棿?#27537;渚濊禆鍏?#32495;?#38171;?#38171;? <li>?#31092;璇曢鍔?#23534;鍙?#28051;?#37828;?#38315;氳繃涓?#30380;姝?#28051;?#30380;姝?#37833;?#28729;?#37812;愮殑?#32029;鑰?#37828;?#37737;?#37711;?#28051;?#30380;姝?#28051;?#30380;姝?#23534;鍙?#26462;?#28000;剁殑鑳藉姏銆?#37733;?#28051;虹畝鍗曠殑闂?#26864;?#37721;?#28000;?#29863;板揩鐐癸紝澶嶆潅?#27537;闂?#26864;?#28751;?#37721;?#28000;?#29863;版參鐐?#37510;?</li></ul> <li>锛圥12锛?#28729;屽杽浜搧浠爜 <ul> <li>瀹?#37812;愮煡閬撴?#28052;?#37707;氱殑浜搧浠爜锛? <li>琛?#37711;?#28051;嶇煡閬撴?#28052;?#37707;氱殑浜?#37725;佷浠爜銆?</li></ul> <li>锛圥14锛?#28725;?#37813;鹃殣鍚殑寮鍙戠洰鏍囷紝瀹屽?#21228;祴璇?#28000;爜 <ul> <li>鍒敤涓?#29785;硶鍙戠幇浜搧浠爜涓殑闂?#26864;?#38171;?涓?#29785;硶?#32048;?#32139;渚嬪瓙涓?#23005;?涓殑鏃?#37706;?#37813;?#28729;屽杽浠爜銆?#37721;?#28000;湪娌?#37832;?#29825;?#29825;?#37804;?#29882;殑鏃?#37706;欙紝鎹?#28051;?#29785;?#25652;?#37804;?#38000;?#38338;?#26864;?#38171;? <li>鍒敤閲?#37835;?#29785;?#37712;?#37721;戠幇?#27537;闂?#26864;?</li></ul> <li>锛圥17锛?#38315;氳繃寮鍙戠殑鍔?#38003;芥潵閲?#37835;勬祴璇?#28000;爜 <li>锛圥33锛?#28051;?#37813;撴柇?#22172;宸?#23480;?#32513;忓湪鍋氱殑宸?#28003;滐紝濡傛灉闈?#29781;?#37813;撴柇涔?#28051;?#29781;佸湪?#26570;?#27537;宸?#28003;?#28051;?#38010;?#28598;?#38336;跨殑鏃堕棿?#32029;骞朵笖涓?#38003;?#37712;嶆鎵撴柇杩?#28051;柊?#27537;宸?#28003;?#37510;傦紙浜?#28051;?#26473;?#28051;?#38171;? <li>锛圥34锛?#37813;?#37714;拌嚜宸辩殑寮鍙戣妭濂?#37510;傦紙涓寮濮嬫參涓鐐癸紝?#21443;?#21443;鍔犲揩?#32029;鍐嶈皟鏁?#37733;炴參?#32029;鐩?#37714;?#37813;?#37714;拌嚜宸?#37832;鍚?#38315;傜殑鑺?#28610;?#37808;?#38171;? <li>锛圥42锛?#37714;犻櫎涓?#38343;瑕佺殑瀛愮?#20249;紝浼?#37721;戠幇?#31092;璇?#28000;爜涓?#28699;樺湪?#27537;涓?#38343;瑕佺殑?#31092;璇?#28052;熷彲浠?#37714;犻櫎锛堟?#24807;純涓?#38343;瑕佺殑涓滆?#21281;紝浼?#29999;?#37716;?#28003;?#37721;戠幇浣?#26473;?#38343;瑕?#28000;涔?#38171;? <li></li></ol> <h2 id="?#31092;璇曠搴?#23534;鍙戝懆鏈熺殑闃舵">?#31092;璇曠搴?#23534;鍙戝懆鏈熺殑闃舵</h2> <ol> <li>鍐?#28051;涓祴璇曠搴?#38171;? <li>璁祴璇曠搴忕紪璇?#38315;氳繃锛? <li>杩?#29723;屾祴璇曠搴忥紝鍙戠幇涓?#38003;?#26473;?#29723;岋紱 <li>璁祴璇曠搴?#37721;?#28000;?#26473;?#29723;岋紱 <li>娑堥櫎閲?#28598;?#29825;?#29825;紝浼樺寲璁?#29825;?#32513;撴?#21225;?</li></ol> </li><img src ="http://www.5432034.com/zhuyuanxiang/aggbug/433616.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-18 23:25 <a href="http://www.5432034.com/zhuyuanxiang/archive/2019/01/18/433616.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>璇?#29785;?#38346;?#26864;戠紪瑙爜?#27537;?#24107;?#24714;銆?#23125;?#26473;涘拰搴旂敤閫夊?#23340;瓑http://www.5432034.com/jb2011/archive/2019/01/18/433615.htmlJack JiangJack JiangFri, 18 Jan 2019 14:02:00 GMThttp://www.5432034.com/jb2011/archive/2019/01/18/433615.htmlhttp://www.5432034.com/jb2011/comments/433615.htmlhttp://www.5432034.com/jb2011/archive/2019/01/18/433615.html#Feedback0http://www.5432034.com/jb2011/comments/commentRss/433615.htmlhttp://www.5432034.com/jb2011/services/trackbacks/433615.html闃?#29831;?#37711;枃

Jack Jiang 2019-01-18 22:02 鍙戣璇勮
]]>
銆婂崟鍏冩祴璇?#28052;?#38316;揓ava鐗?#37510;嬬殑璇?#28052;?#32471;?#29825;?/title><link>http://www.5432034.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.5432034.com/zhuyuanxiang/archive/2019/01/16/433606.html</guid><wfw:comment>http://www.5432034.com/zhuyuanxiang/comments/433606.html</wfw:comment><comments>http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433606.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/zhuyuanxiang/comments/commentRss/433606.html</wfw:commentRss><trackback:ping>http://www.5432034.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="#绗?绔?浣跨敤junit缂?#37712;欐祴璇?>绗?绔?浣跨敤JUnit缂?#37712;欐祴璇?/a> <ul> <li><a href="#31-鏋勫?#21700;崟鍏冩祴璇?>3.1 鏋勫?#21700;崟鍏冩祴璇?/a> <li><a href="#32-junit?#27537;鍚?#32457;?#37826;?#29815;">3.2 JUnit?#27537;鍚?#32457;?#37826;?#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锛堟纭殑锛夎?#22317;?#23678;潯浠?/a> <li><a href="#6浣跨敤mock瀵硅薄">6.浣跨敤Mock瀵硅薄</a> <li><a href="#7-濂界殑?#31092;璇?#37813;鍏?#37832;夌殑?#25639;璐a-trip">7. 濂界殑?#31092;璇?#37813;鍏?#37832;夌殑?#25639;璐?A-TRIP)</a> <li><a href="#8-?#28266;椤?#37929;?#28051;?#26473;?#29723;屾祴璇?>8. ?#28266;椤?#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;圭畝鍗曠殑涔紝涔?#28051;?#38322;囩敤?#27537;JUnit?#27537;鐗?#37832;?#28052;?#37828;?#37827;殑?#32029;浣?#37828;湪?#26570;?#27537;JUnit4涓嬬?#23941;仛淇?#37824;?#28186;?#37906;?#37721;?#28000;?#26473;?#29723;?#37510;傞噸瑕佺殑鏄?#38315;氳繃杩?#37832;?#28052;?#27996;?#29785;JUnit?#28266;Java?#27537;鍗?#37711;冩祴璇?#28051;?#37828;?#28641;?#28003;?#28003;跨敤?#27537;銆?/p> <h2 id="绗?绔?棣?#28051;?#37719;?#37711;冩祴璇?>绗?绔?棣?#28051;?#37719;?#37711;冩祴璇?/h2> <p>璁?#37714;?#28003;犵殑?#31092;璇曪細?#31092;璇?#28051;?#37828;?#37827;?#28051;?#37922;?#37832;夌殑?#32029;涔?#28051;?#37828;?#37808;忔兂澶?#23534;?#27537;銆?#37828;?#37837;规嵁闇瑕?#28051;鐐圭?#35268;坊鍔犵殑?#32029;甯?#37716;嚜宸?#28751;?#37827;?#37734;板?#25120;幇鎬?#38000;?#28051;婄殑璇尯銆?#37721;傜湅杩?#32468;犵粰?#22189;?#27537;渚嬪瓙?#32029;?#24107;鏉悊鎵?#32139;鐒?#23005;?#32429;殑?#32029;缁撴灉涓?#28051;瀹?#37828;?#23005;?#32429;殑銆?/p> <h2 id="绗?绔?浣跨敤junit缂?#37712;欐祴璇?>绗?绔?浣跨敤JUnit缂?#37712;欐祴璇?/h2> <h3 id="31-鏋勫?#21700;崟鍏冩祴璇?>3.1 鏋勫?#21700;崟鍏冩祴璇?/h3> <p>?#31092;璇?#28000;爜蹇?#26916;?#29781;佸仛?#27537;?#22161;浠朵?#23339;?#21635;細</p> <ul> <li>鍑?#28598;囨祴璇曠殑鏉?#28000;?#38171;?#37714;涘?#21700;?#30789;薄銆?#37714;嗛厤璧?#23143;愮?#22796;瓑锛? <li>璋冪敤?#31092;璇曠殑鏂规硶 <li>楠?#29831;佹祴璇?#37826;规?#26336;殑琛?#28051;?#28051;?#37832;?#37832;?#37828;?#37722;?#37929;?#32471;? <li>?#31092;璇曠?#25780;潫鍚庢?#21615;悊?#24135;鍦?#38171;?#38322;婃?#25424;祫婧愮?#22796;瓑锛? <h3 id="32-junit?#27537;鍚?#32457;?#37826;?#29815;">3.2 JUnit?#27537;鍚?#32457;?#37826;?#29815;</h3> <p>鏂?#29815;?#32048;JUnit?#24385;渚涚殑杈呭姪鍑?#37825;帮紝甯?#37716;?#28003;犵璁?#29722;祴璇曞嚱鏁?#37828;?#37722;?#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鍐欑殑?#32029;?#32531;璁?#27996;?#29785;?#28751;?#37721;?#28000;?#27996;嗭紝鍥?#28051;JUnit4?#27537;鍙樺寲?#32221;澶紝浣跨敤涔?#37831;存柟渚跨洿瑙傦紝鍥?#23005;?#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;哄簭</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涓?#38343;瑕佹祴璇曠殑鍦版柟锛圧ight-BICEP锛夛細</p> <ul> <li>Right?#32048;缁撴灉鏄?#37722;?#23005;?#32429;?#38171;圧ight锛?#38171;? <li>B锛氳?#22317;?#23691;紙Boundary锛夋潯浠?#37828;?#37722;?#23005;?#32429;?CORRECT)锛涘弬鑰?#32471;?绔? <li>I锛氳兘鍚?#22955;?#29025;鍙?#37722;?#38171;圛nverse锛?#37711;?#32495;?#38171;? <li>C锛氳繘琛?#27996;?#37721;夋?#29025;锛Cross-Check锛夌殑鍏朵粬鎵嬫锛? <li>E?#32048;寮哄?#22549;敊璇?#38171;Error锛夋潯浠?#37721;戠敓锛?#28003;跨敤Mock瀵硅薄瀹炵幇?#32029;鍙?#38000;?#32471;?绔? <li>P?#32048;?#24359;瓒虫?#38003;?#38171;圥erformance锛夌殑瑕?#23033;?#37510;?</li></ul> <p>?#31092;璇?#37712;?#28729;硅緝澶?#37827;讹紝鍙?#28000;?#28003;跨敤?#31092;璇?#37825;版嵁?#26499;浠?#26473;?#29723;屽噯澶?#37510;?#28003;?#37828;?#28003;跨敤?#26499;浠?#37722;庡氨娌?#37832;夋祴璇?#28000;爜?#28229;璧锋潵閭?#28052;?#37929;?#29785;?#27996;嗭紝鍥?#23005;櫎闈炴祴璇?#37712;?#28729;?#38344;炲父澶嶆?#20646;紝鍚?#37714;欐病鏈夊繀瑕?#38322;囩敤杩?#37837;风殑鏂瑰紡銆?#39582;朵?#26047;?#20635;灉?#31092;璇曟枃浠跺嚭?#24135;?#25930;璇?#38171;?#28003;?#38000;?#28052;?#28051;?#28751;卞嚭?#24135;浜?#37825;版嵁?#25930;璇?#38171;夛紝杩?#28028;?#28725;?#38007;存祴璇?#28051;?#38315;氳繃?#32029;澧炲姞浜?#32513;?#37814;殑鎴?#37832;?#37510;?/p> <h2 id="5correct姝?#32429;殑杈圭?#23678;潯浠?>5.CORRECT锛堟纭殑锛夎?#22317;?#23678;潯浠?/h2> <ul> <li>涓鑷存?#38171;Conformance锛夛細鍊?#37828;?#37722;?#32471;?#37722;?#26864;?#37832;熺殑鏍煎紡锛? <li>鏈?#25652;?#37804;?#38171;Ordering锛夛細涓缁勫?#37828;?#37722;?#32471;?#37722;?#28725;规帓搴忕殑瑕?#23033;傦紙鏈?#25652;?#37804;?#37510;?#37827;?#25652;?#37804;?#38171;?#38171;? <li>?#23599;?#26879;鎬?#38171;圧ange锛夛細鍊?#37828;?#37722;湪鍚堢悊鍙?#37706;艰寖鍥?#37712;?#38171;堝湪鏈灏忓?#28051;?#37832;澶?#37706;?#28052;嬮棿锛?#38171;? <li>?#32041;?#25956;锛圧eference锛?鑰?#37722;堟細浠爜鏄?#37722;紩?#25956;浜?#28051;嶅彈浠爜鏈韩鐩存帴鎺?#37714;剁殑澶?#38318;?#37733;犵礌锛? <li>瀛樺湪鎬?#38171;Existence锛夛細鍊?#37828;?#37722;?#28699;樺湪锛?#28186;嬪?#20646;細闈NULL?#32029;闈為?#35769;紝鍖?#37722;?#27996;庢煇涓?#38342;?#37722;?#32475;夌瓑锛? <li>鍩?#37825;版?#38171;Cardinality锛夛細鏄?#37722;?#37805;板鏈夎冻澶熺殑鍊?#38171;?#38171;?#28052;?#32457;?#28051;洪泦鍚堢殑鍔匡紝鍗抽泦鍚?#38322;岄潰鍖?#37722;殑鍏冪礌涓?#37825;?#38171;? <li>鏃堕棿鎬?#38171;圱ime锛?缁?#28725;?#37827;堕棿鍜?#37929;?#28725;?#37827;堕棿?#32048;鎵鏈夌殑浜嬫儏鏄?#37722;?#37816;夌収椤哄簭鍙戠敓锛?#37828;?#37722;湪姝?#32429;殑鏃堕棿鍙戠敓锛?#37828;?#37722;?#37721;?#37827;?#37721;戠敓锛?</li></ul> <h2 id="6浣跨敤mock瀵硅薄">6.浣跨敤Mock瀵硅薄</h2> <p>Mock瀵硅薄瑙?#37712;崇殑闂?#26864;橈細</p> <ul> <li>?#28257;瀹?#28725;硅薄鍏?#37832;?#28051;嶅彲纭?#28729;氱殑琛?#28051;?#38171;堝?#20646;?#27699;?#29723;屾儏锛?#38171;? <li>?#28257;瀹?#28725;硅薄寰堥?#25424;鍒涘缓锛? <li>?#28257;瀹?#28725;硅薄?#27537;?#28999;浜?#29723;?#28051;哄緢闅捐瑙?#37721;?#38171;堝?#20646;細?#32137;缁滈敊璇?#38171;?#38171;? <li>?#28257;瀹?#28725;硅薄浠?#32459;?#25652;忕殑杩?#29723;?#38315;?#25652;?#23536;堟參锛? <li>?#28257;瀹?#28725;硅薄鏈夌敤鎴风?#23684;潰鎴?#38000;呭氨鏄敤鎴风?#23684;潰锛? <li>?#28257;瀹?#28725;硅薄闇瑕佽璇?#38338;?#28729;?#37828;?#28641;?#28003;?#29722;?#29835;冪敤?#27537;锛堝?#20646;細楠?#29831;佹煇涓?#37733;炶皟鍑?#37825;?#37828;?#37722;?#29722;?#29835;冪敤锛?#38171;? <li>?#28257;瀹?#28725;硅薄瀹?#38340;?#28051;?#28051;嶅?#27194;湪锛堝?#20646;細鍏朵粬寮鍙戝皬缁勭殑?#24116;鍙?#37510;?#37812;?#38000;呮煇涓?#23052;?#37832;夌殑纭?#28000;朵骇?#25639;锛?#37510;?</li></ul> <p>Mock瀵硅薄瑙?#37712;崇殑姝?#26976;細</p> <ul> <li>浣跨敤涓涓帴鍙?#37833;?#37819;?#26473;?#26473;?#28051;?#28725;硅薄锛? <li>涓?#27996;搧浠爜瀹炵幇杩?#28051;帴鍙?#38171;? <li>浠祴璇?#28051;?#37929;殑?#32029;?#28266;Mock瀵硅薄涓?#28729;炵幇杩?#28051;帴鍙?#37510;?</li></ul> <p>?#25950;锛氳繖閲岀殑Mock涓?#37828;綉涓婂凡缁忓Ş鎴?#22935;嗘?#21057;殑Mock宸?#37711;凤紝鏄Mock?#27537;瀹炵幇?#24107;?#24714;銆?#28003;?#38000;?#37818;?#38013;愮殑Mock宸?#37711;?#37828;?a href="http://easymock.org/">EasyMock</a>銆?#37711;朵粬?#27537;Mock宸?#37711;?#37721;?#28000;?#37721;?#38000;?#37510;奫浣跨敤Mock杩?#29723;?#37719;?#37711;冩祴璇]銆?https://blog.csdn.net/u011393781/article/details/52669772)</p> <h2 id="7-濂界殑?#31092;璇?#37813;鍏?#37832;夌殑?#25639;璐a-trip">7. 濂界殑?#31092;璇?#37813;鍏?#37832;夌殑?#25639;璐?A-TRIP)</h2> <ul> <li>?#22172;鍔寲锛Automatic锛?#38171;氳嚜鍔寲鍦拌?#20906;敤?#31092;璇?#37724;屾?#29025;缁撴灉锛?a href="https://www.testwo.com/article/1170">?#29238;?#25956;?#27537;鎸?#32513;?#38342;?#37812;?#23480;?#37711;?/a> <li>褰?#25652;曠殑锛圱horough锛夛細?#31092;璇?#27996;?#37813;鏈?#38343;姹?#37711;虫敞?#27537;鎯?#37712;?#38171;?a href="https://blog.csdn.net/ohcezzz/article/details/78239927">?#29238;?#25956;?#27537;浠爜瑕?#37929;?#23480;?#37711;?/a> <li>鍙?#38322;?#28598;?#38171;圧epeatable锛夛細?#30241;涓祴璇?#25652;?#29831;?#37913;?#32468;?#27996;?#37711;朵粬鎵鏈夌殑?#31092;璇曪紝杩樺繀椤荤嫭绔?#27996;?#37916;?#28583;冿紝浠?#38000;?#37721;?#28000;?#38322;?#28598;嶅湴鎵?#29723;岋紝骞朵笖浜?#37922;?#37929;?#37722;岀殑缁撴灉銆? <li>鐙?#32468;嬬殑锛圛ndependent锛夛細纭?#28103;?#28051;涓?#37713;?#37825;板彧閽?#28725;?#28051;鏍锋祴璇曪紝骞朵笖杩?#28051;祴璇?#28051;?#28186;濊禆浜?#37711;朵粬?#31092;璇?#37510;? <li>涓?#28051;氱殑锛圥rofessional锛夛細?#31092;璇?#28000;爜搴?#29831;?#28051;?#27996;搧浠爜?#27537;缂栫爜椋?#37837;煎拰缂?#37712;?#29840;?#38322;?#37929;?#37722;?</li></ul> <p>濡?#28003;曠淇濇祴璇?#28000;爜鏄?#23005;?#32429;殑鍛?#38171;?/p> <ul> <li>瀵?#27996;搧浠爜涓殑Bug杩?#29723;?#28103;?#37824;圭殑鏃?#37706;?#28052;熸敼杩涙祴璇?#28000;爜锛?#38171;?#37733;?#28051;?#26473;?#28051;Bug鏄祴璇?#28000;爜娌?#37832;?#37721;戠幇?#27537;锛? <li>?#28266;浜搧浠爜涓紩鍏Bug鏉?#26976;?#29831;佹祴璇?#28000;爜?#27537;姝?#32429;?#37804;?#37510;傦紙纭?#28103;?#37721;?#38003;?#28028;?#37721;戠?#29114;殑?#25930;璇?#29722;祴璇?#28000;爜鎹?#37817;?#37714;?#27996;?#38171;?</li></ul> <h2 id="8-?#28266;椤?#37929;?#28051;?#26473;?#29723;屾祴璇?>8. ?#28266;椤?#37929;?#28051;?#26473;?#29723;屾祴璇?/h2> <ul> <li>鎶婃祴璇?#28000;爜涓?#27996;搧浠爜鏀惧湪涓涓?#37929;綍涓?#38171;? <li>涓?#37714;?#27996;?#37711;?#27996;?#28000;爜?#27537;鏃?#37706;欙紝闇瑕?#32429;?#28103;?#28003;犵殑浠爜鍙?#28000;?#38315;氳繃鎵鏈夋祴璇?#38171;? <li>?#31092;璇曠殑鏃堕棿鐐癸細 <ul> <li>缂?#37712;欐柊?#27537;鍑?#37825;?#38171;? <li>淇?#23005;Bug锛? <li>?#30241;娆?#37812;?#37716;熺紪璇?#28052;?#37722;?#38171;? <li>?#30241;娆?#28725;圭増鏈?#37818;?#37714;剁殑?#24385;浜?#38171;? <li>鎸?#32513;?#28051;?#37826;?#37734;?#37922;?#28051;?#38338;殑鏈哄櫒鏉?#26473;?#29723;?#28729;屾?#23544;殑鏋勫?#21700;?#23678;祴璇?#37510;?</li></ul> <li>?#31092;璇?#37714;?#27996;虹殑椤?#37929;?#28000;爜?#32048;鍏?#28729;?#28751;?#37828;?#32513;?#37814;?#37714;?#27996;虹殑椤?#37929;?#32513;?#28725;?#37828;?#28051;?#28598;?#38338;?#26864;橈紝鍚?#37827;朵篃鏄?#28051;?#36423;?#26916;婚潰瀵圭殑闂?#26864;?#37510;?#38343;瑕佺悊鎬殑鎬佸害锛?#28051;?#37813;?#29831;?#37714;?#27996;虹殑浠爜锛?#37510;佸喎闈欑殑鎵嬫锛?#28051;嶉殢?#31350;淇?#37824;?#37714;?#27996;虹殑浠爜锛?#37510;佹?#20343;?#21615;殑鑰愬績锛?#37711;?#28000;庢祴璇?#28000;爜寮濮嬶紝?#21443;?#21443;閲?#37835;?#26916;?#37929;?#28000;爜?#32029;浣?#28052;?#38322;嶆柊鍥?#37714;板仴搴风姸鎬?#38171;?#37510;佺湡姝殑鏅烘収锛堢煡閬?#28000;涔?#37837;风殑椤?#37929;?#25652;?#29831;?#26440;?#37714;?#28000;涔?#37837;风殑鐩?#37837;囷紝涓?#37813;?#37931;浜?#38322;?#37835;?#37812;?#28051;涓?#28729;岀?#24227;殑?#23032;鎬侊紝涔?#28051;嶇畝鍗曟?#24807;?#20910;殢涔嬭嚜鐢熻嚜鐏?#37510;傦級 <li>?#31092;璇?#28051;?#29831;?#28729;細涓?#28051;?#38007;?#37928;?#37718;?#26916;朵釜璇?#38017;?#27996;紝鏀?#28051;嬭嚜鎴戠殑鎵?#37931;?#32029;?#24116;绾?#37722;?#32457;?#28051;?#37722;岀殑鎰?#29785;侊紝鎵?#38003;藉仛?#22189;浠嚜宸辨弧鎰忕殑椤?#37929;?#37510;?</li></ul> <h2 id="9-璁?#29825;?#29831;?#26864;?>9. 璁?#29825;?#29831;?#26864;?/h2> <ul> <li>?#28528;鍚戞祴璇曠殑璁?#29825;細涓?#37826;逛究?#31092;璇曠殑璁?#29825;?#28051;?#37828;?#28610;界殑璁?#29825;?#38171;?#29831;?#37828;?#29825;?#29825;?#26473;?#27996;庡兊?#23538;鎴?#38000;呰噧鑲匡紝闇瑕佺畝?#23538;鎴?#38000;?#28103;?#37824;?#28003;?#28052;?#37831;?#37714;敤鏈?#37833;殑鎵?#28766;?#37724;?#32513;?#37814;?#37510;? <li>?#28528;鍚戞祴璇曠殑閲?#37835;勶細涓?#37826;逛究?#31092;璇曠殑浠爜涓?#37828;?#28610;界殑浠爜锛?#29831;?#37828;?#28051;氬姟娣锋?#20634;湪涓璧凤紝鏃犳硶瀹炵幇涓涓?#37713;?#37825;板彧閽?#28725;?#28051;鏍锋祴璇曪紝闇瑕?#28103;?#37824;硅璁?#28003;?#28051;氬姟鍒嗙銆? <li>?#31092;璇曠?#33636;殑涓嶅彉鎬細灏?#37828;?#28725;圭?#33636;殑鏂?#29815;蹇?#26916;?#28051;虹湡銆? <ul> <li>鏈?#25652;?#37804;?#37510;?#28186;嬪?#20646;細sorted list绫荤殑涓嶅彉鎬?#28751;?#37828;?#37827;?#29825;哄?#25120;敓浠涔堬紝缁撴灉閮?#25652;?#29831;?#37828;?#37832;?#25652;忕殑銆? <li>缁撴?#21227;寲銆?#28186;嬪?#20646;?#27699;鍗曠?#33636;粺涓瘡涓?#37833;?#37929;?#36423;?#26916;?#28766;?#27996;?#28051;涓?#29825;?#37719;曪紝涓涓?#29825;?#37719;?#37815;?#37832;?#28051;涓?#37812;?#28598;?#28051;?#37833;?#37929;?#37510;? <li>鏁板涓嶅彉鎬?#37510;?#28186;嬪?#20646;細閾?#29723;岃̎鍙风殑?#27537;鍊?#29840;峰繀椤?#39582;宠銆? <li>鏁版嵁涓鑷存?#37510;?#28186;嬪?#20646;細鍟嗗搧鎬?#37825;?搴?#28699;?#37825;?閿鍞?#37825;?#37510;?</li></ul> <li>?#31092;璇曢鍔殑璁?#29825;?#37510;?#28003;?#28003;?#28003;?#28051;?#27996;搧浠爜?#27537;?#25956;鎴峰湪缂栫爜?#32029;鑰?#28051;?#37828;?#27996;?#37725;佸紑鍙?#38000;呭湪缂栫爜?#32029;寮鍙?#32513;撴灉鏇?#38003;藉弽搴旂敤鎴风殑闇姹?#37510;? <li>?#31092;璇?#37827;?#37825;堢殑鍙傛暟銆傚綋浣?#28003;?#28051;?#27996;搧浠爜?#27537;?#25956;鎴?#37827;讹紝浣?#37813;?#38003;界湡姝?#32429;?#28729;?#37725;?#27996;?#29840;?#28000;?#25652;?#29831;?#28003;?#37833;?#37813;?#37815;咃紝鑰屽摢浜?#37828;?#28051;?#38343;瑕佺殑銆?#28186;嬪?#20646;細鏃?#37825;堢殑鍙傛暟搴?#29831;?#37922;?#37725;?#28051;?#37713;?#37825;版潵鎵?#37815;呮?#29025;璐?#28000;诲憿锛?</li></ul> </li><img src ="http://www.5432034.com/zhuyuanxiang/aggbug/433606.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-16 17:57 <a href="http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433606.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>銆?#38322;?#37835;勩嬬殑璇?#28052;?#32471;?#29825;?amp;ndash;鏂规硶鍒楄http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433605.html鏈?#26473;?#32520;?/dc:creator>鏈?#26473;?#32520;?/author>Wed, 16 Jan 2019 09:50:00 GMThttp://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433605.htmlhttp://www.5432034.com/zhuyuanxiang/comments/433605.htmlhttp://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433605.html#Feedback0http://www.5432034.com/zhuyuanxiang/comments/commentRss/433605.htmlhttp://www.5432034.com/zhuyuanxiang/services/trackbacks/433605.html绗?绔?閲?#37835;?#37714;楄
  • 6.1 (P110)Extract Method锛堟?#24878;?#29006;嚱鏁?#38171;?/a>
  • 6.2 Inline Method锛?#37712;?#38001;斿嚱鏁?#38171;?17
  • 6.3 Inline Temp锛?#37712;?#38001;?#28051;?#37827;?#37721;?#38322;?#38171;?19
  • 6.4 Replace Temp with Query锛?#28000;煡璇?#37721;?#28000;?#28051;?#37827;?#37721;?#38322;?#38171;?20
  • 6.5 Introduce Explaining Variable锛堝紩鍏?#29785;?#38322;?#37804;?#37721;?#38322;?#38171;?24
  • 6.6 Split Temporary Variable锛?#37714;?#29785;?#28051;?#37827;?#37721;?#38322;?#38171;?28
  • 6.7 Remove Assignments to Parameters锛?#32457;婚櫎瀵?#37721;傛暟?#27537;璧嬪?#38171;?31
  • 6.8 Replace Method with Method Object锛?#28000;?#37713;?#37825;板?#30789;薄鍙?#28000;?#37713;?#37825;?#38171;?35
  • 6.9 Substitute Algorithm锛堟浛鎹?#32480;楁硶锛?39
  • 绗?绔??#28266;瀵硅薄涔嬮棿?#24777;绉荤壒鎬?41
  • 7.1 Move Method锛堟惉绉?#37713;?#37825;?#38171;?42
  • 7.2 Move Field锛堟惉绉?#28699;楁锛?46
  • 7.3 Extract Class锛堟?#24878;偧绫?#38171;?49
  • 7.4 Inline Class锛?#28751;嗙被鍐?#38001;斿寲锛?54
  • 7.5 Hide Delegate锛堥殣钘?#37413;?#28654;?#37813;?#37711;?#32495;?#37413;?#38171;?57
  • 7.6 Remove Middle Man锛?#32457;婚櫎涓棿浜?#38171;?60
  • 7.7 Introduce Foreign Method锛堝紩鍏?#28598;?#37716;犲嚱鏁?#38171;?62
  • 7.8 Introduce Local Extension锛堝紩鍏?#37832;?#37734;?#37813;?#28766;?#38171;?64
  • 绗?绔?閲嶆柊缁勭粐鏁版嵁
  • 绗?绔??#30045;?#23538;鏉?#28000;?#29723;?#26440;惧紡 237
  • 绗?0绔??#30045;?#23538;鍑?#37825;拌?#20906;敤
  • 绗?1绔?澶勭悊姒傛嫭鍏?#32495;?319

      绗?绔?閲?#37835;?#37714;楄

      5.1 閲?#37835;勭殑璁板綍鏍煎紡103

      杩?#28051;?#37837;煎紡鍙?#28000;?#28003;?#28051;鸿嚜宸?#37832;?#37833;?#29825;板綍閲?#37835;?#37813;嬫?#26336;殑鏍囧?#21997;紝鏂逛究?#29025;闃呰嚜宸卞父?#25956;?#27537;鍜?#37804;?#32513;撶殑閲?#37835;?#37826;瑰紡?#32048;

      • 鍚?#32457;帮細閲?#37835;?#29831;?#23033;?#29723;?
      • 姒傝?#20362;細閫傜敤?#27537;鎯呮櫙?#32029;浠?#37721;?#37813;鍋氱殑浜嬫儏
      • 鍔?#37832;猴細璇?#37828;?#37413;?#28051;?#28000;涔?#38343;瑕?#37413;?#37724;?#37413;?#28000;涔堟儏鍐?#28051;嶅仛鈥?
      • 鍋氭硶?#32048;閲?#37835;勭殑姝?#26976;?#38171;堢湅浼肩畝鍗曪紝鍏?#28729;?#23536;?#38322;?#29781;侊紝鍥?#28051;?#38322;?#37835;?#28051;嶅缓璁?#29882;宠瀹?#37812;愶紝鏈濂?#28103;?#29831;佹瘡娆?#28051;?#30380;姝?#38318;?#37828;?#23005;?#32429;殑锛?
      • ?#23510;渚嬶細閫氳繃渚嬪瓙姝?#32429;殑?#24714;瑙?#38322;?#37835;?#37813;嬫?#26336;殑鎿?#28003;?#37826;瑰紡

      5.2 瀵?#37813;惧紩?#25956;鐐?05

      ?#32041;?#25956;鐐癸細灏?#37828;?#38317;?#27996;涜閲?#37835;勭殑浠爜琚?#37725;?#27996;?#28000;爜璋冪敤浜?#37510;傜幇?#28266;?#27537;閲?#37835;勫伐鍏?#23480;?#32513;?#37721;?#28000;畝?#23538;杩?#27996;涙搷浣滐紝浣?#37828;?#23480;?#37711;锋案杩?#38318;?#37828;?#37832;夐?#24878;殑?#32029;?#27342;浜?#23480;?#37711;?#26473;?#25652;?#29831;?#37908;熸倝涓浜涘熀鏈殑鎿?#28003;?#37813;嬫銆?/p>

      5.3 杩?#27996;?#38322;?#37835;?#37813;嬫硶鏈?#28598;?#37812;愮啛106

      瀛?#28052;犲?#23676;?#36328;敤杩?#27996;?#38322;?#37835;?#28000;?#28000;?#37828;?#28051;?#29863;风?#30328;紝涓氬姟?#28266;鍙?#37510;佸伐鍏峰湪鍙?#37510;?#29831;?#29815;?#28266;鍙?#37510;佸浜嬬墿?#27537;?#24714;瑙?#28052;熷湪鍙橈紝鍥?#23005;?#28729;?#37711;尯鏈夎嚜宸辩殑閲?#37835;?#37813;嬫鎵?#37828;?#37832;缁堢殑鐩?#37837;?#37510;?/p>

      6.1 (P110)Extract Method锛堟?#24878;?#29006;嚱鏁?#38171;?/h3>

      鍔?#37832;猴細Long Methods闂?#26864;?#37812;?#38000;?#28000;爜闇瑕丆omments闂?#26864;?#38171;?
      鏂规硶?#32048;锛?#37721;?#28000;?#28003;跨敤IDE?#24385;渚涚殑閲?#37835;勫伐鍏凤紝涓嬮潰?#27537;鍏蜂?#25780;搷浣滅殑?#24107;?#24714;锛?/p>

      • 鍒?#38315;?#28051;涓?#37826;板嚱鏁帮紝鏍规嵁杩?#28051;?#37713;?#37825;扮殑鎰?#37733;炬潵瀵?#28729;冨懡鍚?#38171;?
      • 灏嗘?#24878;偧?#27537;浠爜鎷?#29840;?#37714;版?#26495;?#21700;嚱鏁?#28051;?#38171;?
      • 妫?#29025;鎻愮偧?#27537;浠爜鏄?#37722;紩?#25956;浜?#37413;?#28003;滅敤?#29017;闄?#27996;庡師鍑?#37825;?#37413;濈殑鍙?#38322;?#38171;堝眬閮?#37721;?#38322;?#37510;佸師鍑?#37825;板?#20635;暟锛?
      • 妫?#29025;鎻愮偧?#27537;浠爜鏄?#37722;?#37718;?#37722;?#27996;?#37413;?#28000;呯敤浜?#29722;?#37819;愮偧浠爜娈?#37413;濈殑涓?#37827;?#37721;?#38322;?
        • 濡傛灉鏈夛紝?#28266;鐩?#37837;囧嚱鏁?#28051;?#28751;?#28052;嬪鏄?#28051;哄眬閮?#37721;?#38322;?
      • 妫?#29025;琚?#37819;愮偧浠爜娈碉紝?#28229;?#28229;鏄?#37722;?#37832;?#28000;?#28003;曞眬閮?#37721;?#38322;忕殑鍊艰?#31916;鏀?#37721;橈紝
        • 濡傛灉涓?#37827;?#37721;?#38322;忕殑鍊艰淇?#37824;?#27996;嗭紝灏?#29831;?#28751;嗘?#24878;偧?#27537;浠爜鍙?#28051;?#28051;涓煡璇紝灏?#32513;撴灉杩?#37733;炵粰鐩?#37711;?#37721;?#38322;?#38171;?
        • 濡傛灉涓嶅鎿?#28003;滐紝鎴?#38000;呰淇?#37824;圭殑鍙?#38322;?#28598;?#27996;?#28051;涓紝鍙?#28000;?#28751;?#29831;?#38171;?#37714;?#29785;?#28051;?#37827;?#37721;?#38322;?浠煡璇?#37831;?#37817;?#37721;?#38322;?#38171;夌瓑鎵嬫浜?#37510;?
      • 灏嗚鎻愮偧浠爜娈?#28051;?#38343;瑕佽璇?#37721;栫殑灞閮?#37721;?#38322;忥紝?#32139;鍙傛暟浼犵粰鐩?#37837;囧嚱鏁?
      • 澶勭悊瀹?#37813;鏈夊眬閮?#37721;?#38322;?#37722;庯紝缂?#29831;戯紝妫?#29025;
      • ?#28266;婧?#37713;?#37825;?#28051;紝灏嗚鎻愮偧?#27537;浠爜鏇?#37817;?#28051;哄鐩?#37837;囧嚱鏁扮殑璋冪敤
      • 缂?#29831;戯紝妫?#29025;?#32029;?#31092;璇?

      6.2 Inline Method锛?#37712;?#38001;斿嚱鏁?#38171;?17

      鍔?#37832;猴細?#32139;鍑?#37825;?#37712;?#38318;殑浠爜涓?#37711;?#37722;?#32457;?#28051;鏍?#37828;撴?#20646;紝鍙?#28000;湪鍑?#37825;拌?#20906;敤鐐规彃鍏?#37713;?#37825;?#37832;綋?#32029;绉婚櫎璇?#37713;?#37825;?#37510;?br>琛?#37711;咃細瀵?#37832;?#28051;缇?#28051;?#28598;?#37722;堢悊?#27537;鍑?#37825;帮紝鍙?#28000;?#37711;?#37712;?#38001;?#28051;?#28051;涓?#38336;垮嚱鏁帮紝鐒?#37722;庡啀鎻愮?#29006;嚭鍚堢悊?#27537;灏忓嚱鏁?/p>

      6.3 Inline Temp锛?#37712;?#38001;?#28051;?#37827;?#37721;?#38322;?#38171;?19

      鍔?#37832;猴細?#32139;涓?#37827;?#37721;?#38322;?#37721;?#29722;?#28051;涓畝鍗曠殑琛?#26440;惧紡璧嬪?#28051;娆紝鑰?#28051;?#28729;?#28641;?#32432;?#37711;朵粬閲?#37835;?#37826;规硶鏃讹紝鎵?#38343;瑕?#38322;?#37835;?br>鏉?#28000;讹細Inline Temp澶?#37719;?#37828;?#28051;Replace Temp with Query锛?#28000;煡璇?#37721;?#28000;?#28051;?#37827;?#37721;?#38322;?#38171;夊噯澶?br>鏂规硶?#32048;灏?#37813;鏈?#28725;?#29831;?#37721;?#38322;忕殑?#32041;?#25956;鍔?#28003;?#37831;?#28000;?#37812;?#28725;?#28729;?#29863;嬪肩殑琛?#26440;惧紡鏈韩銆?/p>

      6.4 Replace Temp with Query锛?#28000;煡璇?#37721;?#28000;?#28051;?#37827;?#37721;?#38322;?#38171;?20

      鍔?#37832;猴細浣犵殑绋?#25652;?#28000;?#28051;涓?#28051;?#37827;?#37721;?#38322;?#28103;?#28699;?#28051;涓?#29723;?#26440;惧紡?#27537;璁?#32480;?#32513;撴灉
      鏂规硶?#32048;灏嗚杈惧紡鎻愮?#29006;嚭鐙?#32468;嬬殑鍑?#37825;帮紝鐒?#37722;?#28051;?#37827;?#37721;?#38322;忕殑璋冪敤鏇?#37817;?#37812;?#37826;板嚱鏁扮殑璋冪敤銆傛鍚庢?#26495;嚱鏁?#28052;?#38003;借璋冪敤銆?
      鍏蜂?#25780;?#35268;硶?#32048; 灏嗘?#24878;?#29006;嚭鏉殑鍑?#37825;扮敤private淇?#24110;紝濡傛?#28357;嫭绔嬪嚱鏁?#37832;夊壇浣滅敤?#32029;閭?#28725;?#28729;?#26473;?#29723;孲eparate Query from Modifier锛?#28751;嗘煡璇?#37713;?#37825;板拰淇?#37824;瑰嚱鏁?#37714;嗙锛?/p>

      6.5 Introduce Explaining Variable锛堝紩鍏?#29785;?#38322;?#37804;?#37721;?#38322;?#38171;?24

      灏?#28598;嶆?#20637;杈惧紡锛堟垨鑰?#37711;朵腑涓閮?#37714;?#38171;夌殑缁撴灉璧嬪?#32513;?#28051;涓?#28051;?#37827;?#37721;?#38322;忥紝?#25956;涓?#37827;?#37721;?#38322;?#37722;?#32457;版潵瑙?#38322;?#29723;?#26440;惧紡?#27537;?#25956;閫?/p>

      6.6 Split Temporary Variable锛?#37714;?#29785;?#28051;?#37827;?#37721;?#38322;?#38171;?28

      涓?#37827;?#37721;?#38322;?#29722;?#29863;嬪?#29906;?#26473;?#28051;娆紝浣?#37828;?#28729;?#37827;?#28051;?#37828;?#23536;?#37916;?#37721;?#38322;?#28052;?#28051;?#37828;?#29722;敤浜庢?#22549;泦璁?#32480;?#32513;撴灉
      ?#24107;鍥狅細涓涓?#37721;?#38322;?#25652;?#29831;?#37813;?#37815;?#28051;涓?#29840;?#28000;伙紝濡傛?#28358;璧嬪煎?#27693;寰?#37721;?#38003;?#37813;?#37815;?#27996;?#28598;?#28051;?#29840;?#28000;?br>鏂规硶?#32048;閽?#28725;规瘡娆?#29863;嬪硷紝鍒涘?#28888;柊?#27537;涓?#37827;?#37721;?#38322;?/p>

      6.7 Remove Assignments to Parameters锛?#32457;婚櫎瀵?#37721;傛暟?#27537;璧嬪?#38171;?31

      java鏄?#37706;?#28028;?#38315;掞紝瀵?#37721;傛暟?#27537;浠?#28003;?#28103;?#37824;?#38318;?#28051;?#28028;?#28725;硅?#20906;敤绔?#27996;?#37922;熷奖鍝嶏紝鎵浠?#28725;?#27996;庣敤杩囧紩?#25956;浼?#38315;掔殑浜哄彲鑳?#28028;?#37721;戠?#29114;悊瑙敊璇?
      鍙傛暟搴?#29831;?#28000;呰绀?#37413;滆浼?#38315;?#26473;?#37833;殑涓滆鈥?/p>

      6.8 Replace Method with Method Object锛?#28000;?#37713;?#37825;板?#30789;薄鍙?#28000;?#37713;?#37825;?#38171;?35

      鍔?#37832;猴細?#28266;澶?#37736;嬪嚱鏁?#37712;咃紝瀵瑰眬閮?#37721;?#38322;忕殑浣跨敤瀵?#38007;撮毦浠?#28003;跨敤Extract Method锛堟?#24878;?#29006;嚱鏁?#38171;?#26473;?#29723;?#38322;?#37835;?br>鏂规硶?#32048;灏?#26473;?#28051;?#37713;?#37825;版斁鍏?#28051;涓?#28725;硅薄閲岋紝灞閮?#37721;?#38322;?#37721;?#37812;?#28725;硅薄鎴愬憳鍙?#38322;忥紝鐒?#37722;庡彲浠湪鍚?#28051;瀵硅薄涓?#28751;?#26473;?#28051;?#28598;?#37736;嬪嚱鏁?#37714;?#29785;?#28051;哄涓?#28751;忓?#23338;嚱鏁?#37510;?
      ?#24107;鍥狅細灞閮?#37721;?#38322;?#28028;氬?#28850;姞鍒?#29785;?#37713;?#37825;扮殑鍥伴毦搴?/p>

      6.9 Substitute Algorithm锛堟浛鎹?#32480;楁硶锛?39

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

      绗?绔??#28266;瀵硅薄涔嬮棿?#24777;绉荤壒鎬?41

      鏈?#32468;犵殑閲?#37904;?#37828;惉绉?#38171;圡ove锛?#37510;?#37413;?#37712;?#28729;?#37814;?#29840;?#28000;?#37824;惧湪鍝?#38322;?#37413;?#37828;潰鍚?#28725;硅薄璁?#29825;?#28051;?#37832;閲?#29781;佺殑浜嬫儏涔?#28051;?#32029;浣?#37828;?#37714;?#23534;濮?#29825;?#29825;?#37827;讹紝鐢?#27996;?#37814;鏈?#37724;?#28051;氬姟?#29025;璇嗙殑涓嶈冻鏃犳硶淇?#29831;佸仛?#22189;?#27537;鍐?#28729;?#37828;?#23005;?#32429;殑?#32029;閭?#28052;?#37722;?#37832;熻皟鏁?#28051;?#28751;?#37413;?#29840;?#28000;?#37413;濇惉绉?#37714;版纭殑瀵硅薄涓?#28751;?#37828;?#38322;?#29781;佺殑閲?#37835;?#37813;嬫銆?#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;猴細绫?#28051;煇涓?#37713;?#37825;?#28051;?#37711;朵粬绫?#27996;?#27996;?#26473;?#28598;?br>鏂规硶?#32048;灏?#29831;?#37713;?#37825;版惉绉?#37714;?#27996;?#27996;?#37832;澶氱殑绫?#38322;岄潰?#32029;灏?#37827;?#37713;?#37825;板彉鎴愬鎵樺嚱鏁?#37812;?#38000;?#37714;犻櫎銆?
      鍏蜂?#25780;?#35268;硶?#32048;

      • 妫?#29025;婧愮被涓?#29722;?#23143;?#37713;?#37825;?#28003;跨敤?#27537;涓鍒囩壒鎬紝濡傛?#28357;壒鎬?#29722;?#37711;朵粬鍑?#37825;?#28003;跨敤?#32029;鑰冭檻杩?#27996;涘嚱鏁?#28051;璧锋惉绉?
      • 妫?#29025;婧愮?#33636;殑瀛愮被鍜岃秴绫伙紝?#28229;?#28229;鏄?#37722;?#37832;?#29831;?#37713;?#37825;扮殑澹?#37828;庯紝濡傛灉?#22189;?#24135;?#32029;寰?#37721;?#38003;?#28051;?#38003;芥惉绉?#37510;?
      • 鐩?#37837;囩被闇瑕佷?#36328;敤婧愮?#33636;殑鐗?#37804;細
        1. 灏?#29831;?#37911;?#37804;?#26462;?#32457;?#37714;?#37929;?#37837;囩被锛?
        2. ?#32531;绔?#37929;?#37837;囩被鍒?#23143;愮被涔嬮棿?#32041;?#25956;銆?
        3. 灏?#23143;愮被浣?#28051;哄?#20635;暟浼犵粰鐩?#37837;囩被
        4. 灏?#29831;?#37911;?#37804;?#28003;?#28051;哄?#20635;暟浼犵粰鐩?#37837;囩被
      • 濡傛灉婧?#37713;?#37825;板寘鍚?#23534;傚父澶勭悊?#32029;闇瑕?#38000;冭檻鏄湪鐩?#37837;囩被杩?#37828;?#23143;?#37713;?#37825;?#28598;勭悊

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

      鍔?#37832;猴細绫?#28051;煇涓?#28699;楁琚?#37711;朵粬绫?#26864;戠?#20343;?#36328;敤锛堝寘鎷細浼?#37721;傛暟銆佽?#20906;敤鍙?#37706;煎嚱鏁?#37510;佽?#20906;敤璁惧煎嚱鏁?#38171;?br>鏂规硶?#32048;灏?#29831;?#28699;楁?#22443;惉绉?#37714;?#37929;?#37837;囩被
      鍏蜂?#25780;?#35268;硶?#32048;

      • 鍏?#28751;佽杩?#28051;?#28699;楁锛?
      • ?#28266;鐩?#37837;囩被?#32531;绔?#26473;?#28051;?#28699;楁?#30857;紝骞朵笖灏佽锛?
      • 璁?#28729;?#37929;?#37837;?#28725;硅薄锛?
      • 鏇?#37817;?#28725;?#23143;?#28699;楁?#30005;殑?#32041;?#25956;涓?#37929;?#37837;囩?#33636;殑鍙?#37706;煎嚱鏁?

      7.3 Extract Class锛堟?#24878;偧绫?#38171;?49

      鍔?#37832;猴細涓涓?#32491;?#37707;?#27996;?#28051;?#28051;?#32491;荤殑浜?br>鏂规硶?#32048;

      • ?#32531;绔嬫柊绫伙紝灏?#37929;?#25652;旂殑瀛楁鍜屽嚱鏁版斁鍒版柊绫?
      • 浣跨敤Move Field閲?#37835;?#38171;?
      • 浣跨敤Move Method閲?#37835;?#38171;?
      • 鍒?#37826;?#37828;?#37722;?#38343;瑕?#37711;?#23534;?#26570;绫?#37510;?

      7.4 Inline Class锛?#28751;嗙被鍐?#38001;斿寲锛?54

      鍔?#37832;猴細?#28999;涓?#32491;?#37716;?#38003;?#28598;?#28751;戯紝涓Extract Class锛堟?#24878;偧绫?#38171;夌浉鍙?鏂规硶?#32048;灏?#26473;?#28051;?#32491;荤殑鎵鏈夌壒鎬惉绉?#37714;板彟涓绫?#28051;紝绉婚櫎璇?#32491;?#37510;?br>?#24107;鍥狅細澶氭Extract Class鍚庯紝?#24107;绫?#28598;?#38318;?#37714;嗗姛鑳借绉?#29863;帮紝灏?#26473;?#28051;?#38016;庣缉绫?#28051;?#37711;朵粬鐩?#26473;戠殑绫?#37722;?#39582;?/p>

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

      鍔?#37832;猴細瀹?#37812;风閫氳?#22247;鎵?#32491;?#37833;?#37721;?#23536;?#37721;?#28051;涓?#28725;硅薄?#27537;淇伅
      鏂规硶?#32048;?#28266;鏈嶅姟绫?#28051;婂缓绔?#28729;?#37812;风鎵闇鏁版嵁?#27537;鍑?#37825;帮紝鐒?#37722;庨殣钘忓鎵?#37711;?#32495;?br>渚濇嵁?#32048;绗?#37722;?#37413;?#28751;佽鈥濈殑鐗?#37804;?#37510;傚綋濮?#37813;?#32491;?#37721;戠?#29111;?#27194;寲涓?#28028;?#28725;?#28729;?#37812;风閫?#37812;愬奖鍝嶏紝鍑忓皯瀹?#37812;风涓?#29835;冪敤鑰?#28052;嬮棿?#27537;鑰?#37722;堟?#37510;?/p>

      7.6 Remove Middle Man锛?#32457;婚櫎涓棿浜?#38171;?60

      鍔?#37832;猴細?#28999;涓?#32491;?#37707;?#27996;?#26473;?#28598;氱殑濮?#37813;樺姩浣?br>鏂规硶锛氳瀹?#37812;风鐩存帴璋冪敤濮?#37813;?#32491;伙紝涓Hide Delegate锛堥殣钘?#37413;?#28654;?#37813;?#37711;?#32495;?#37413;?#38171;夌浉鍙?渚濇嵁?#32048;?#32139;?#24107;濮?#37813;?#32491;荤殑鐗?#37804;?#29906;婃潵瓒婂?#27710;紝鏈嶅姟绫荤殑濮?#37813;樺嚱鏁板?#21978;?#23107;潵瓒婇暱?#32029;闇瑕佽瀹?#37812;风鐩存帴璋冪敤?#32029;閬?#37711;?#37832;嶅姟绫?#23052;?#28051;?#28051;棿浜?#37510;?/p>

      7.7 Introduce Foreign Method锛堝紩鍏?#28598;?#37716;犲嚱鏁?#38171;?62

      鍔?#37832;猴細浣跨敤?#27537;绫?#37827;犳硶?#24385;渚涙煇涓?#37716;?#38003;斤紝浣?#37828;?#37721;?#28051;?#38003;?#28103;?#37824;?#29831;?#32491;?br>鏂规硶?#32048;鏂板?#21700;嚱鏁帮紝骞?#28751;?#37832;嶅姟绫荤殑瀵硅薄瀹?#28186;?#28003;?#28051;哄?#20635;暟浼?#37711;?#37510;?br>鍏蜂綋鍔?#37832;猴細濡傛灉闇瑕?#28051;?#37832;嶅姟绫诲?#28850;姞澶?#38322;忕殑鏂规硶?#32029;璇?#38000;冭檻浣跨敤Introduce Local Extension锛堝紩鍏?#37832;?#37734;?#37813;?#28766;?#38171;?/p>

      7.8 Introduce Local Extension锛堝紩鍏?#37832;?#37734;?#37813;?#28766;?#38171;?64

      鍔?#37832;猴細浣跨敤?#27537;绫?#37827;犳硶?#24385;渚涘涓?#37716;?#38003;斤紝浣?#37828;?#37721;?#28051;?#38003;?#28103;?#37824;?#29831;?#32491;?br>鏂规硶?#32048;?#32531;绔嬫柊?#27537;绫伙紝?#28266;?#26570;绫?#28051;缓绔?#38343;瑕佺殑鍔?#38003;藉嚱鏁帮紝鍙?#28000;?#28003;?#28051;?#37832;嶅姟绫荤殑瀛愮被瀹炵幇?#26570;?#27537;绫伙紝涔熷彲浠?#37718;呰鏈嶅姟绫?#28729;炵幇?#26570;?#27537;绫?#37510;?br>鍏蜂?#25780;儏鍐碉細

      • 棣?#38315;夊?#24878;?#20249;紝宸?#28003;?#38322;?#37832;?#30380;
        • 浣?#37828;?#36423;?#26916;诲湪瀵硅薄鍒涘缓鏈?#28729;?#37826;斤紝濡傛灉涓?#29723;屽氨鍙?#38003;?#38315;?#37815;?#37718;呰绫?#38171;?
        • 瀛愮?#33636;殑瀵硅薄涓?#38003;?#28103;?#37824;圭?#21057;?#33636;殑鏁版嵁?#32029;鍚?#37714;欏缓璁?#38315;?#37815;?#37718;呰绫伙紝鍥?#28051;?#28028;?#28725;?#38007;寸?#21057;被瀵硅薄涓庡?#24878;被瀵硅薄?#27537;鏁版嵁鍙?#38003;?#28051;?#28051;鑷?
      • 鍖呰绫?#38343;瑕?#28729;炵幇琚?#37718;呰瀵硅薄?#27537;鎵鏈夋帴鍙紝宸?#28003;?#38322;忓緢澶?#37510;?

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

      鏈?#32468;?#38322;?#37904;?#37828;?#28641;?#28003;?#37831;?#28610;藉?#26495;?#20349;鍚?#32457;?#32491;诲?#23340;殑鏁版嵁銆?#37832;?#29238;?#25956;?#27537;鎵嬫灏?#37828;疭elf Encapsulate Field锛?71锛?/p>

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

      鍔?#37832;猴細鐩存帴璁?#38338;?#28051;涓?#28699;楁?#30857;紝浣?#37828;?#28699;楁涔嬮棿?#27537;鑰?#37722;?#37711;?#32495;?#38315;愭笎鍙?#23536;?#32471;?#37815;?#37510;?
      鏂规硶锛氳嚜灏佽?#21613;氨鏄湪瀵?#27996;?#32491;?#37712;?#38318;殑瀛楁涔熷?#20349;涓涓?#29825;惧煎彇鍊肩殑鍑?#37825;?#37510;?
      浜?#29825;猴細瀛楁璁?#38338;?#37826;瑰紡鏄?#37929;存帴璁?#38338;?#26473;?#37828;棿?#24116;璁?#38338;?#28051;鑷?#27996;?#29825;?#28051;?#37826;?
      ?#26879;?#24116;璁?#38338;殑濂?#28598;勶細

      • 瀛愮被鍙?#28000;?#38315;氳繃瑕?#37929;?#28051;涓?#37713;?#37825;版潵鏀?#37721;樿幏鍙?#37825;版嵁?#27537;閫?#23536;?#38171;?
      • 鏀?#37816;?#37831;寸?#22443;?#33636;殑鏁版嵁绠悊?#32029;濡傚欢杩熷姞杞?#38171;?#38343;瑕佺敤鍒?#37813;嶅姞杞?#38171;夌瓑銆?#37929;存帴璁?#38338;殑濂?#28598;勶細浠爜瀹?#37828;?#29831;?#37811;傦紝?#24714;瑙?#28051;?#38343;瑕?#26462;?#37817;?#28051;哄彇鍊煎嚱鏁?#37510;?

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

      鍔?#37832;猴細鍋囧涓涓?#37825;版嵁椤?#38343;瑕?#28051;?#37711;朵粬鏁版嵁涓璧蜂?#36328;敤鎵?#37832;?#37808;?#28052;?#37510;傛?#29256;嵁宸?#32513;?#28051;?#28000;?#28000;?#37922;?#28051;鏉畝鍗曠殑鏁版嵁椤?#32513;?#37812;愶紝渚嬪?#20646;細鐢?#29831;?#37721;风爜
      鏂规硶?#32048;灏?#37825;版嵁鍙?#37812;?#28725;硅薄銆?/p>

      8.3 Change Value to Reference锛?#28751;嗗煎?#30789;薄鏀?#28051;哄紩?#25956;瀵硅薄锛?79

      鍔?#37832;猴細涓涓?#32491;?#37832;?#29825;?#28598;?#37929;?#32475;夌殑瀹?#28186;嬶紝甯?#37832;?#37814;?#26473;?#27996;?#37929;?#32475;夌殑瀹?#28186;嬬粺涓涓?#28051;涓?#28725;硅薄?#32029;鏂?#28186;跨粺涓淇?#37824;?#37812;?#38000;?#26473;?#29723;?#37929;哥瓑鎬?#23011;旇緝
      鏂规硶?#32048;灏嗗煎?#30789;薄鍙?#37812;愬紩?#25956;瀵硅薄
      鈥滃紩?#25956;瀵硅薄鈥?#28051;?#37413;?#37706;煎?#30789;薄鈥濈殑?#23599;鍒細

      • ?#30241;涓紩?#25956;瀵硅薄浠?#29723;?#37931;?#24135;瀹?#28051;?#28051;涓?#28725;硅薄?#32029;浣跨敤瀵硅薄?#27537;涓鑷存敤鏉?#22955;?#31092;涓?#28051;?#28725;硅薄鏄?#37722;?#37929;哥瓑?#32029;鍗?==)
      • 鍊煎?#30789;薄瀹?#37711;?#37922;?#37711;惰嚜?#38889;?#27537;鍊?#37833;?#37929;?#27996;掑尯鍒嗭紝闇瑕?#38322;?#37712;?#28051;浜?#37826;规?#26336;敤鏉?#22955;?#31092;涓?#28051;?#28725;硅薄鏄?#37722;?#37929;哥瓑銆傦紙閲?#37712;equals()鍜宧ashcode()鏂规硶锛?#37711;蜂?#25780;?#35268;硶?#32048;
      • 闇瑕佷?#36328;敤宸?#37720;傛?#32033;鏉?#37714;涘?#21700;?#30789;薄
      • 闇瑕佸彟涓涓?#28725;硅薄锛堟垨鑰?#37828;嚜?#38889;锛?#28003;?#28051;?#29825;?#38338;?#37904;规潵璁?#38338;?#28729;?#28052;夌殑?#32041;?#25956;瀵硅薄?#32029;瀵硅薄?#25956;Dictionary鎴?#38000;匟ashTable鏉?#28103;?#28699;?#28725;硅薄
      • 鍐?#28729;?#28725;硅薄鏄?#26864;?#37711;?#37714;涘缓杩?#37828;?#37716;?#37804;?#37714;涘缓

      8.4 Change Reference to Value锛?#28751;嗗紩?#25956;瀵硅薄鏀?#28051;哄煎?#30789;薄锛?83

      鍔?#37832;猴細?#32041;?#25956;瀵硅薄?#32029;寰堝皬涓?#28051;嶅彲鍙橈紝鑰?#28051;?#28051;?#37828;?#32480;悊

      • 寰堝皬?#32048;鍒涘缓璁?#28598;?#28052;?#28051;?#28028;?#23057;?#38000;?#28598;?#28598;?#37712;呭瓨
      • 涓嶅彲鍙橈細涓?#38343;瑕?#28598;嶆潅?#27537;绠悊浠爜?#32029;涔?#28051;?#38343;瑕?#38000;冭檻鍚屾闂?#26864;橈紝杩?#28028;?#38315;?#37812;?#37714;?#37722;?#38338;?#26864;?#37711;蜂?#25780;?#35268;硶?#32048;
      • 妫?#29025;閲?#37835;勭洰鏍?#37828;?#37722;?#37828;?#28051;嶅彲鍙?#28725;硅薄鎴?#38000;?#37721;?#28103;?#37824;?#37812;?#28051;嶅彲鍙?#28725;硅薄
        • 浣跨敤Remove Setting Method鍙?#37812;?#28051;嶅彲鍙?#28725;硅薄
        • 濡傛灉鏃犳硶淇?#37824;?#37812;?#28051;嶅彲鍙?#28725;硅薄?#32029;灏辨?#24807;純閲?#37835;?
      • 閲?#37712;hashCode鍜宔quals()鏂规硶
      • 鍙?#23057;?#28003;跨敤?#27537;宸?#37720;傛?#32033;?#32029;骞?#28751;?#28725;硅薄?#27537;鏋?#38315;犲嚱鏁?#29825;?#28051;簆ublic

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

      鍔?#37832;猴細濡傛灉鏁版嵁瀛樺偍?#27537;鍊?#28000;?#29723;?#28051;?#37722;岀殑涓滆銆?br>鏂规硶?#32048;灏?#37825;?#32513;?#37721;?#37812;?#28725;硅薄?#32029;鏁?#32513;勭殑?#30241;涓?#37711;冪?#29365;敤瀛楁琛?#32448;?/p>

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

      鍔?#37832;猴細 鏈?#28051;氬姟鏁版嵁缃韩浜GUI鎺?#28000;朵腑?#32029;鑰?#28051;?#28051;氬姟鐩?#37711;崇殑鍑?#37825;?#38343;瑕佽闂?#26473;?#27996;?#37825;版嵁
      鏂规硶?#32048;灏?#28051;氬姟鏁版嵁澶?#37714;?#37714;?#28051;氬姟绫?#28051;?#37510;傚缓绔婳bserver妯紡?#32029;鍚屾UI鍜?#28051;氬姟绫荤殑鏁版嵁銆?/p>

      8.7 Change Unidirectional Association to Bidirectional锛?#28751;?#37719;?#37722;?#37711;?#38001;?#37824;?#28051;哄弻鍚?#37711;?#38001;?#38171;?97

      鍔?#37832;猴細涓?#28051;?#32491;?#37929;?#27996;?#28052;嬮棿閮?#38343;瑕佸鏂圭殑鏁版嵁?#32029;浣?#37828;?#37929;?#27996;?#28052;嬮棿鍙?#37832;?#28051;鏉?#37719;?#37722;戠殑杩炴帴
      杩?#28051;?#38322;?#37835;?#38343;瑕佹坊鍔犳祴璇曪紝鍥?#28051;?#37413;?#37721;?#37722;戞寚閽?#37413;?#23536;?#28729;?#37828;?#38315;?#37812;?#23075;蜂贡銆?
      鍏蜂?#25780;?#35268;硶?#32048;

      • ?#28266;琚紩?#25956;绫?#23075;?#37716;犲?#26945;?#30857;紝淇?#28699;樺紩?#25956;绫荤殑鎸?#38333;?#38171;?
      • 鍒?#37826;?#37922;?#37725;?#28051;?#32491;?#37833;?#37818;?#37714;?#37711;?#38001;?#37711;?#32495;?#38171;?
        • 濡傛灉涓?#38000;?#38318;?#37828;紩?#25956;瀵硅薄?#32029;涓?#37711;?#38001;?#37711;?#32495;?#28051;?#37413;?#28051;瀵?#28598;?#37413;濈殑鍏?#32495;伙紝閭?#28052;?#28751;辩敱鈥?#37815;?#37832;?#37719;?#28051;?#32041;?#25956;鈥濈殑瀵硅薄浣?#28051;烘帶鍒?#38000;?#38171;?
        • 濡傛灉A瀵硅薄鏄疊瀵硅薄?#27537;閮?#28000;讹紝鍒?#37922;B瀵硅薄璐?#29840;?#37818;?#37714;?#37711;?#32495;?#38171;?
        • 濡傛灉涓?#38000;?#38318;?#37828;紩?#25956;瀵硅薄?#32029;涓?#37711;?#38001;?#37711;?#32495;?#28051;?#37413;?#28598;?#28725;?#28598;?#37413;濈殑鍏?#32495;伙紝閭?#28052;堥殢鎰忕瀹?#28051;涓?#28725;硅薄浣?#28051;烘帶鍒?#38000;?#37510;?
      • ?#28266;琚?#37818;?#32468;缓绔嬭?#21613;姪鍑?#37825;帮紝鍛?#37722;嶆竻鏅板?#29256;弿杩?#37711;剁敤閫?#38171;?
        • 濡傛灉淇?#37824;瑰嚱鏁板湪鎺?#37714;剁?#32029;鍒?#37922;?#37711;?#29840;?#29840;?#37831;存?#26495;弽鍚戞寚閽?#38171;?
        • 濡傛灉淇?#37824;瑰嚱鏁板湪琚?#37818;?#37714;剁?#32029;鍒欏湪鎺?#37714;剁?#32531;绔?#28051;涓?#28103;?#37824;?#37721;嶅皠鎸?#38333;堢殑鍑?#37825;帮紝鐢?#28103;?#37824;瑰嚱鏁拌?#20906;敤鍏朵慨鏀?#37721;?#37722;戞寚閽?#37510;?
        • 涓?#38000;?#37828;?#28051;瀵?#28598;?#37711;?#32495;伙紝鏈?#37719;?#28051;?#32041;?#25956;鎵?#37815;?#37818;?#37714;?#37711;?#38001;?#37711;?#32495;?#29840;?#28000;?

      8.8 Change Bidirectional Association to Unidirectional锛?#28751;?#37721;?#37722;?#37711;?#38001;?#37824;?#28051;哄崟鍚?#37711;?#38001;?#38171;?00

      鍔?#37832;猴細涓?#28051;?#32491;?#37832;?#37721;?#37722;?#37711;?#38001;旓紝浣?#37828;?#28051;涓?#32491;?#28051;?#37712;?#38343;瑕佸彟涓涓?#32491;荤殑鐗?#37804;?
      ?#24107;鍥狅細

      • 鍙?#37722;?#37711;?#38001;?#37721;?#38003;?#38315;?#37812;愬兊灏?#28725;硅薄?#32029;涓?#38003;借娓呴櫎閲婃斁鍐呭瓨銆?
      • 浣?#28051;?#28051;?#32491;?#28699;樺湪鑰?#37722;?#37711;?#32495;伙紝涓涓?#32491;荤殑鍙樺寲浼?#28725;?#38007;?#37721;?#28051;绫荤殑鍙樺寲銆傛?#35268;硶?#32048;?#24147;?#27342;鍙?#37722;?#37711;?#38001;?br>鍥伴毦?#32048;妫?#29025;鍙?#29723;?#37804;?

      8.9 Replace Magic Number with Symbolic Constant锛?#28000;?#28699;楅潰?#29238;閲?#37721;?#28000;?#27012;旀硶鏁?#38171;?04

      鍔?#37832;猴細鏈?#28051;涓?#28699;楅潰?#29238;閲?#38171;堥櫎浜?鍜?涔?#28598;?#38171;?
      鏂规硶?#32048;鍒涘?#21700;父閲?#29863;嬪?#28000;?#29831;?#28699;楅潰?#29238;閲忥紝缁?#27996;堝懡鍚?#37510;?/p>

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

      鍔?#37832;猴細涓涓?#32491;?#37832;塸ublic瀛楁
      灏?#28729;冨鏄?#28051;簆rivate?#32029;骞舵彁渚?#37929;?#25652;旂殑璁?#38338;?#37713;?#37825;?/p>

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

      鍔?#37832;猴細绫?#28051;?#28003;跨敤闆?#37722;堬紝浣?#37828;?#38342;?#37722;?#28051;?#38003;芥彁渚?#32513;欑敤鎴风?#23384;帴鎿?#28003;滐紝鑰?#37828;彁渚涘嚱鏁版搷浣?#38342;?#37722;堬紝闄?#28003;庣敤鎴?#28051;庨泦鍚?#28052;嬮棿?#27537;鑰?#37722;?#25652;?
      鏂规硶?#32048;?#24385;渚涘嚱鏁?#26473;?#37733;為泦鍚堢殑鍙?#29831;诲壇鏈紝骞舵彁渚涘?#28850;?#29362;拰鍒犻櫎闆?#37722;?#37711;冪?#29365;殑鍑?#37825;?
      鍏蜂?#25780;?#35268;硶?#32048;

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

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

      鍔?#37832;猴細?#28528;瀵?#37827;?#32459;?#25652;?#28051;璕ecord鏁版嵁缁撴瀯?#32029;鏂板缓绫?#37721;?#28000;?#28729;?br>鏂规硶?#32048;涓?#29831;?#29825;板綍鍒涘缓涓涓?#37413;?#37725;?#37413;?#37825;版嵁瀵硅薄銆?/p>

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

      ?#29238;瑙?#27996;?#26473;囧幓?#27537;C璇?#29815;缂?#32459;?#28051;紝鍥?#28051;?#23052;?#37832;?#37835;?#28051;撅紝鎵浠?#38322;囩敤绫诲?#23340;爜?#27537;鏂瑰紡鏍囨敞銆?#26473;?#28051;?#38322;?#37835;?#38316;?#37714;扮殑鏈?#28028;氭?#26055;緝?#30380;

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

      鍔?#37832;猴細绫?#28051;殑鏁板?#32491;诲?#23340;爜涓嶅奖鍝?#32491;荤殑琛?#28051;?br>鏂规硶?#32048;浠?#28051;涓柊绫?#37831;?#28000;?#32491;诲?#23340;爜

      8.14 Replace Type Code with Subclasses锛?#28000;?#28699;愮被鍙?#28000;?#32491;诲?#23340;爜锛?23

      鍔?#37832;猴細鏈?#28051;涓?#28051;嶅彲鍙樼殑绫诲?#23340;爜涓斿奖鍝?#32491;荤殑琛?#28051;?br>鏍囧織?#32048;switch鎴?#38000;卛f-then-else绫荤殑鏉?#28000;?#29723;?#26440;惧紡?#32029;杩?#28051;?#38322;?#37835;?#37828;疪eplace Conditional with Polymorphism?#27537;鍑?#28598;?#23480;?#37711;?
      鏂规硶?#32048;浠?#28699;愮被鍙?#28000;?#26473;?#28051;?#32491;诲?#23340;爜

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

      鍔?#37832;猴細鏈?#28051;涓?#32491;诲?#23340;爜涓斿奖鍝?#32491;荤殑琛?#28051;猴紝浣?#37828;?#37827;犳硶閫氳?#22249;户鎵?#23057;堥櫎锛?#32491;诲?#23340;爜鍙?#37721;樺寲锛?br>鏂规硶?#32048;浠姸鎬佸?#30789;薄鍙?#28000;?#37510;?/p>

      8.16 Replace Subclass with Fields锛?#28000;?#28699;楁鍙?#28000;?#28699;愮被锛?32

      鍔?#37832;猴細鍚?#28051;?#28699;愮被鍞?#28051;?#23599;鍒?#37721;湪鈥?#26473;?#37733;炲父閲忕殑鏁版嵁鈥濈殑鍑?#37825;?#28051;?br>鏂规硶?#32048;淇?#37824;?#26473;?#27996;涘嚱鏁?#28003;垮畠浠?#26473;?#37733;炶秴绫荤殑?#28999;涓?#38171;堟?#26495;锛夊?#26945;?#30857;紝鐒?#37722;庨姣佸?#24878;被銆?/p>

      绗?绔??#30045;?#23538;鏉?#28000;?#29723;?#26440;惧紡 237

      鏉?#28000;堕昏緫闈炲父澶嶆?#20646;紝涔?#38344;炲父?#27622;浠悊瑙紝閫氳繃閲?#37835;勫皢澶嶆潅?#27537;閫昏?#25117;?#26336;幇涓虹畝鍗曠殑閫昏?#25117;潡銆?br>鏈?#27996;?#38322;?#37835;?#37826;规?#26336;湅璧锋潵闈炲父?#30045;鍗曪紝鍥?#28051;?#38322;?#37835;?#37832;閲?#29781;佺殑鎬濇兂涓?#37828;?#37826;规硶鏈?#28598;?#32494;惧?#27417;紝鑰?#37828;?#28028;?#26440;?#27996;?#28051;涓皬姝揩璧扮殑?#24714;?#24247;銆?#28751;?#37828;?#28051;娆?#37721;?#28729;?#37812;?#28051;涓皬閲?#37835;勶紝鐒?#37722;庢祴璇曠淇?#23052;?#37832;夐敊璇?#37510;?#37906;?#37722;庯紝鍐?#26473;?#29723;?#28051;?#28051;涓皬閲?#37835;勫?#23678;祴璇?#37510;?#28000;?#38000;屾暣涓?#28598;?#38322;?#37835;?#38315;氳繃澶?#28051;畝鍗曠殑?#30380;閲?#37835;?#28729;?#37812;愶紝閬?#37711;?#28598;?#38322;?#37835;勫嚭?#25930;鍚?#38343;瑕?#37711;?#38318;?#37733;炴?#27697;殑闂?#26864;?#37510;?/p>

      9.1 Decompose Conditional锛?#37714;?#29785;?#37833;?#28000;?#29723;?#26440;惧紡锛?38

      鍔?#37832;猴細if-then-else璇?#37721;紝涓?#37722;?#37714;嗘敮鍋?#28051;?#37722;?#27996;?#37716;?#37832;?#37812;?#28598;?#37736;嬪嚱鏁帮紝鏈韩灏遍毦浠?#38339;?#29831;伙紝灏?#37711;跺湪甯?#37832;?#28598;嶆?#20635;潯浠剁殑閫昏緫涓?#37510;傛?#35268;硶?#32048;

      • 灏唅f璇?#37721;?#37819;愮偧涓哄嚱鏁?
      • 灏唗hen鍜宔lse娈佃?#33445;?#24878;偧涓哄嚱鏁?
      • 瀵?#27996;庡?#27194;湪宓?#28610;楃殑鏉?#28000;堕昏?#25135;紝鍏?#37714;?#37826;?#37828;?#37722;?#37721;?#28000;敤Replace Nested Conditional with Guard Clauses锛?#28000;?#37719;?#29831;?#37721;?#37721;?#28000;?#23443;?#28610;?#37833;?#28000;?#29723;?#26440;惧紡锛?#23057;堥櫎銆?#28051;?#29723;?#37712;?#37714;?#29785;瘡涓?#37833;?#28000;?

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

      鍔?#37832;猴細鏈?#28051;绯?#37714;?#37833;?#28000;?#37714;?#37826;?#38318;?#37832;嶅姟浜?#37711;?#37722;岀殑鐩?#37837;?
      鏂规硶?#32048;灏?#26473;?#27996;涙潯浠?#37714;?#37826;?#37722;?#39582;朵负鍚?#28051;涓?#29723;?#26440;惧紡?#32029;鍐嶅皢杩?#28051;?#29723;?#26440;惧紡鎻愮偧涓虹嫭绔嬪嚱鏁?
      ?#24107;鍥狅細

      • 鍙?#37828;?#28051;娆?#37833;?#28000;舵?#29025;?#32029;鍙?#37828;?#28699;樺湪澶?#28051;?#39582;?#37714;?#37833;?#28000;堕渶瑕佹?#29025;鑰屽凡
      • 涓篍xtract Method锛堟?#24878;?#29006;嚱鏁?#38171;?#37707;?#37713;?#28598;囷紝閫氳?#22247;嚱鏁?#37722;嶅?#23108;煡鈥?#28051;?#28000;涔?#26473;?#28052;?#37707;?#37413;?

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

      鍔?#37832;猴細?#28266;鏉?#28000;?#29723;?#26440;惧紡?#27537;涓?#37722;?#37714;嗘敮涓?#28699;樺湪鐩?#37722;岀殑浠爜
      鏂规硶?#32048;灏?#26473;?#27996;?#38322;?#28598;?#28000;爜?#24777;绉?#37714;版潯浠?#29723;?#26440;惧紡涔?#28598;栵紝澶氳浠爜杩?#37721;?#28000;?#37712;嶆?#24878;偧涓虹嫭绔嬪嚱鏁?#37510;?br>渚嬪?#20646;細?#32139;try鍜宑atch鎵?#29723;?#37929;?#37722;?#28000;爜?#32029;鍙?#28000;?#28751;?#28000;爜绉?#37714;final?#23599;娈?#37510;?/p>

      9.4 Remove Control Flag锛?#32457;婚櫎鎺?#37714;?#37837;?#29825;?#38171;?45

      鍔?#37832;猴細?#28266;寰?#37916;?#37813;?#29723;岀殑绋?#25652;忔涓紝?#28999;涓?#37721;?#38322;?#28729;?#28052;?#28051;哄垽鏂?#37833;?#28000;朵腑?#27537;鎺?#37714;?#37837;?#29825;?#38171;control flag锛夛紝澧炲姞浜?#28000;爜?#24714;瑙殑澶嶆潅搴?br>鏂规硶?#32048;

      • 浠break鎴?#38000;卌ontinue浠?#37831;?#38171;?
      • 涔熷彲浠?#38315;氳?#22247;嚱鏁拌?#20906;敤鍜宺eturn璇?#37721;?#37833;?#28729;炵幇銆?

      9.5 Replace Nested Conditional with Guard Clauses锛?#28000;?#37719;?#29831;?#37721;?#37721;?#28000;?#23443;?#28610;?#37833;?#28000;?#29723;?#26440;惧紡锛?50

      鍗?#29831;?#37721;細濡傛灉?#28999;涓?#37833;?#28000;舵鍏剁綍瑙侊紝灏?#25652;?#29831;?#37719;曠嫭妫?#29025;璇?#37833;?#28000;讹紝骞跺湪璇?#37833;?#28000;朵?#34425;湡鏃剁珛鍒?#28000;庡嚱鏁?#28051;?#26473;?#37733;烇紝杩?#37837;风殑鍗曠嫭妫?#29025;琚?#32457;?#28051;?#37413;?#37719;?#29831;?#37721;?#37413;?#38171;坓uard clauses锛?
      鍔?#37832;猴細鍑?#37825;?#28051;殑鏉?#28000;堕昏緫浣?#27996;洪毦浠?#37930;嬫竻姝?#32429;殑鎵?#29723;?#29882;?#23536;勩?br>鏂规硶?#32048;浣跨敤鍗?#29831;?#37721;?#29723;幇鎵鏈夌殑鐗规?#23107;儏鍐?/p>

      9.6 Replace Conditional with Polymorphism锛?#28000;?#28598;?#37804;佸彇浠?#37833;?#28000;?#29723;?#26440;惧紡锛?55

      鍔?#37832;猴細瀛樺湪鏉?#28000;?#29723;?#26440;惧紡鏍规嵁瀵硅薄?#27537;绫诲瀷涓?#37722;?#38315;?#37815;?#28051;?#37722;岀殑琛?#28051;?
      鏂规硶?#32048;灏嗚杈惧紡鍒嗘敮鏀?#26473;?#28051;?#37722;屽?#24878;?#20249;紝鐒?#37722;?#38322;?#37712;欐?#35268;硶?#32029;灏嗗師濮嬪嚱鏁版?#24878;偧涓?#37814;借薄鍑?#37825;?#37510;?/p>

      9.7 Introduce Null Object锛堝紩鍏Null瀵硅薄锛?60

      鍔?#37832;猴細闇瑕佸啀涓夋?#29025;瀵硅薄鏄?#37722;?#28051;null
      鏂规硶?#32048;灏null鍊?#37831;?#28000;?#28051;null瀵硅薄?#32029;濡傛灉?#24107;濮?#32491;?#28051;?#37711;佽淇?#37824;?#37721;?#28000;?#28003;跨敤Null?#24116;鍙?#37833;?#22955;?#29025;鈥?#28725;硅薄鏄?#37722;?#28051;Null鈥?#37510;?/p>

      9.8 Introduce Assertion锛堝紩鍏?#37826;?#29815;锛?67

      鍔?#37832;猴細?#28999;娈?#28000;爜闇瑕佸?#22317;搴忕姸鎬?#37828;惧紡鍦拌鏄庢?#24878;?#23941;亣璁?
      鏂规硶?#32048;浠?#37826;?#29815;鏄庣琛幇杩?#32457;嶅亣璁?
      鍏蜂?#25780;?#35268;硶?#32048; 鏂?#29815;?#28266; 鍙?#29999;冪殑鏃?#37706;欑粺?#31930; 琚?#29882;?#26473;?/p>

      绗?0绔??#30045;?#23538;鍑?#37825;拌?#20906;敤

      浣挎帴鍙?#37721;?#23536;?#37831;村?#29365;畝娲?#37828;撶敤?#27537;閲?#37835;?#37826;规硶銆?/p>

      • 淇?#37824;瑰嚱鏁?#37722;?#32457;帮紝浣?#28052;?#28729;?#37828;撶悊瑙?#38171;?
      • 缂?#37933;?#37721;傛暟鍒楄锛?
      • 涓?#37722;岀殑鍔?#38003;?#37714;嗙鍒?#28051;?#37722;岀殑鍑?#37825;?#28051;?#38171;?
      • ?#27555;钘忓嚱鏁帮紝?#24385;鍗囨帴鍙殑璐?#38322;?#37510;?

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

      鍔?#37832;猴細鍑?#37825;扮殑鍚?#32457;?#28051;?#38003;?#29831;?#37828;庡嚱鏁扮殑?#25956;閫?br>鏂规硶?#32048;灏?#37827;?#37713;?#37825;?#28000;爜?#24777;绉?#37714;版?#26495;嚱鏁帮紝鏃?#37713;?#37825;拌烦杞?#37714;版?#26495;嚱鏁?#37510;?/p>

      10.2 Add Parameter锛堟坊鍔?#37721;傛暟锛?75

      鍔?#37832;?#38171;氳璋冪敤?#27537;鍑?#37825;?#38343;瑕?#28000;?#29835;冪敤鍑?#37825;?#28051;?#23536;?#37714;版洿澶氱殑淇伅
      鏂规硶?#32048;涓?#29722;?#29835;冪敤?#27537;鍑?#37825;版坊鍔?#37721;傛暟
      鎶?#37815;細

      • ?#24135;鏈?#37721;傛暟鏄?#37722;彁渚涜冻澶熺殑淇伅锛?
      • 杩?#28051;?#37713;?#37825;?#37828;?#37722;?#25652;?#29831;?#32457;?#37716;?#37714;版嫢鏈?#29831;?#28103;伅?#27537;瀵硅薄涓?#38171;?
      • 鍔?#37711;?#37826;板?#20635;暟鏄?#37722;?#37722;?#38315;傦紵
      • 濡傛灉闇瑕佺殑鍙傛暟杩?#28598;氾紝鏄?#37722;?#38343;瑕佷?#36328;敤Introduce Parameter Object锛堝紩鍏?#37721;傛?#26495;?#30789;薄锛?#38171;?

      10.3 Remove Parameter锛?#32457;婚櫎鍙傛暟锛?77

      鍔?#37832;猴細鍑?#37825;?#28051;?#38343;瑕佹煇涓?#37721;傛暟锛?#28051;?#38343;瑕?#27996;?#28751;辨?#24807;純?#32029;淇濈暀涔?#38343;瑕?#28000;樺嚭浠?#28000;?#38171;?br>鏂规硶?#32048;

      • 濡傛灉鏄?#37913;?#32468;嬬殑鍑?#37825;帮紝鐩存帴灏?#29831;?#37721;傛暟绉婚櫎
      • 濡傛灉鏄?#28598;?#37804;佸嚱鏁帮紝涓?#38003;?#32457;婚櫎?#32029;灏卞?#28850;姞涓涓柊?#27537;娌?#37832;?#26473;?#28051;?#37721;傛暟?#27537;鍑?#37825;帮紝浣?#29835;冪敤鑰呯殑宸?#28003;?#23536;?#37714;扮畝?#23538;

      10.4 Separate Query from Modifier锛?#28751;嗘煡璇?#37713;?#37825;板拰淇?#37824;瑰嚱鏁?#37714;嗙锛?79

      鍔?#37832;猴細?#28999;涓?#37713;?#37825;?#37827;?#28103;?#37824;?#28725;硅薄?#23032;鎬侊紝鍙?#26473;?#37733;?#28725;硅薄?#23032;鎬佸?#37510;傦紙浣?#29835;冪敤鑰?#37815;呭績璇?#37823;?#28003;?#28103;?#37824;?#27996;?#28051;?#25652;?#29831;?#28103;?#37824;圭殑鏁版嵁?#32029;澧炲姞璋冪敤鑰呯殑鎿?#28003;?#29840;?#37815;?#38171;?br>鏈?#29840;細鍑?#37825;板姛鑳界畝娲?#37510;?#37828;庣?#32029;濡傛灉涓涓?#37713;?#37825;?#37711;?#28598;?#28598;?#28051;?#37716;?#38003;斤紝灏?#37814;婂畠浠?#37714;嗙鎴?#28598;?#28051;?#37713;?#37825;?#37510;?
      鏂规硶?#32048;?#32531;绔?#28051;?#28051;?#28051;?#37722;岀殑鍑?#37825;帮紝鍏朵腑涓涓?#29840;?#29840;煡璇紝鍙?#28051;涓?#29840;?#29840;?#28103;?#37824;?#37510;?
      ?#24107;鍒欙細

      • 浠?#28003;?#28051;涓?#37832;?#26473;?#37733;炲肩殑鍑?#37825;?#38318;?#28051;?#25652;?#29831;?#37832;夌湅寰?#37714;扮殑鍓?#28003;滅敤銆?
      • 缂栫爜涓?#28051;?#29781;?#38000;冭?#25120;殑涓?#37828;?#28000;爜?#27537;鏁?#37916;囷紝鑰?#37828;?#28000;爜?#27537;鏄?#29831;?#37804;紝鏁?#37916;?#37721;?#28000;湪鏈?#37833;?#28051;婄?#36328;殑鏃?#37706;?#37712;?#37837;规嵁瀹?#38340;?#38343;瑕佽皟鏁?#37510;?#28598;氱?#36328;?#23350;細灏?#28103;?#37824;?#37724;屾煡璇?#37713;?#37825;板?#20349;?#21613;湪涓涓?#37722;屾鍑?#37825;?#28051;?#37714;?#23534;璋冪敤銆?

      10.5 Parameterize Method锛?#28000;?#37713;?#37825;版?#21700;甫鍙傛暟锛?83

      鍔?#37832;猴細?#22161;涓?#37713;?#37825;帮紝鍋?#27996;嗙被浼肩殑宸?#28003;滐紝鍙?#37828;?#28000;爜涓殑绯?#37825;?#28051;?#37722;?
      鏂规硶?#32048;?#32531;绔?#37719;?#28051;鍑?#37825;帮紝浠?#37721;傛暟浣?#28051;?#32495;?#37825;?/p>

      10.6 Replace Parameter with Explicit Methods锛?#28000;?#37828;庣鍑?#37825;板彇浠?#37721;傛暟锛?85

      鍔?#37832;猴細鍑?#37825;颁?#28618;禆浜庡?#20635;?#26495;肩殑涓?#37722;?#38000;?#38322;?#37721;?#28051;?#37722;岀殑琛?#28051;?
      鏂规硶?#32048;閽?#28725;?#29831;?#37721;傛暟?#27537;?#30241;涓?#37721;?#38003;藉硷紝?#32531;绔嬬嫭绔嬪嚱鏁?#37510;?
      瀵规瘮?#32048;涓Parameterize Method锛?#28000;?#37713;?#37825;版?#21700;甫鍙傛暟锛夌浉鍙嶏紝浣?#37828;?#37929;殑閮?#37828;?#37814;婂?#23942;潅?#27537;閫昏緫鍒?#37826;?#23057;堥櫎 鐩殑?#32048;?#24385;渚涙竻鏅扮殑鍏?#37721;?#37510;?br>濡傛灉鍙傛?#26495;煎?#29808;嚱鏁拌涓哄奖鍝?#28051;?#28598;紝涓?#25652;?#29831;?#38322;囩敤姝?#37826;规硶銆?/p>

      10.7 Preserve Whole Object锛?#28103;濇?#20344;?#30789;薄瀹屾暣锛?88

      鍔?#37832;猴細浠庢煇涓?#28725;硅薄鍙?#38011;?#39582;?#28051;?#37706;硷紝鎶婁粬浠?#28003;?#28051;哄?#20635;暟浼犵粰鍑?#37825;?
      鏂规硶?#32048;鏀?#28051;?#29835;冪敤鏁?#28051;?#28725;硅薄
      鐩殑?#32048;閬?#37711;?#26473;?#38336;垮?#20635;暟鍒楄
      缂?#38340;凤細濡傛灉浼?#38315;掔殑鏄?#37706;硷紝閭?#28052;堝嚱鏁板彧渚濊?#26669;偅浜涘?#38171;涘?#20635;灉浼?#38315;掔殑鏄?#28725;硅薄?#32029;鍑?#37825;?#37714;?#28186;濊禆瀵硅薄?#32029;浼?#28725;?#38007;?#38000;?#37722;?
      ?#25950;鎰忥細鏈?#37827;?#37706;?#37713;?#37825;?#28003;跨敤浜?#23536;?#28598;氭潵?#22172;?#28999;涓?#28725;硅薄?#27537;鏁版嵁?#32029;閭?#28052;?#25652;?#29831;?#38000;冭檻浣跨敤锛圡ove Method锛夊皢杩?#28051;?#37713;?#37825;?#32457;?#37714;?#37711;?#32495;?#28725;?#37714;囩殑瀵硅薄涓?/p>

      10.8 Replace Parameter with Methods锛?#28000;?#37713;?#37825;板彇浠?#37721;傛暟锛?92

      鍔?#37832;猴細瀵硅薄璋冪敤?#28999;涓?#37713;?#37825;帮紝骞?#28751;?#37813;寰?#32513;撴灉浣?#28051;哄?#20635;暟浼?#38315;?#32513;?#37721;?#28051;涓?#37713;?#37825;帮紝鑰屾帴?#24392;璇?#37721;傛暟?#27537;鍑?#37825;?#37832;韩涔?#38003;?#28598;熻?#20906;敤?#22688;涓涓?#37713;?#37825;?
      鏂规硶锛氳鍙傛?#29256;帴?#24392;鑰呭幓?#27342;璇?#26916;?#37721;傛暟?#32029;骞剁?#23384;帴璋冪敤?#22688;涓涓?#37713;?#37825;?/p>

      10.9 Introduce Parameter Object锛堝紩鍏?#37721;傛?#26495;?#30789;薄锛?95

      鍔?#37832;猴細鏈?#27996;涘?#20635;?#29256;?#37828;嚜鐒?#37734;?#37722;?#37827;跺嚭?#24135;
      鏂规硶?#32048;?#25956;涓涓?#28725;硅薄鎶?#26473;?#27996;涘?#20635;?#26495;?#21616;?#21616;?#38155;潵杩?#29723;?#28028;?#38315;?br>鐩殑?#32048;

      • 缂?#37933;?#37721;傛暟鍒楄闀垮害锛?
      • 鍑?#37825;?#37711;?#37832;?#28051;鑷存紝闄?#28003;庣悊瑙?#37724;?#28103;?#37824;?#28000;爜?#27537;?#27622;搴?

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

      鍔?#37832;猴細绫荤殑?#28999;涓?#28699;楁搴?#29831;?#28725;硅薄鍒涘?#34425;殑鏃?#37706;?#29722;?#29825;剧疆?#32029;鐒?#37722;?#28051;?#37712;嶆敼鍙?
      鏂规硶?#32048;?#24147;鎺?#29831;?#28699;楁?#30005;殑璁剧疆鍑?#37825;?/p>

      • 濡傛灉瀵?#37721;傛暟?#27537;杩愮畻寰堢畝鍗曪紝鑰?#28051;?#37721;?#37832;?#28051;涓?#37835;?#38315;犲嚱鏁帮紝灏?#37721;?#28000;?#37929;存帴?#28266;鏋?#38315;犲嚱鏁?#28051;?#37714;?#28654;嬪寲銆?
      • 濡傛灉淇?#37824;?#28598;嶆?#20646;紝鎴?#38000;?#37832;?#28598;?#28051;?#37713;?#37825;?#29831;?#37733;炬敼鍙樿繖涓?#28699;楁?#30857;紝閭?#28052;?#28751;?#38343;瑕佹彁渚?#28051;涓?#37913;?#32468;嬪嚱鏁帮紝骞剁粰浜堢嫭绔嬪嚱鏁?#28051;涓竻妤氳杈剧敤閫旂殑鍚嶅瓧
      • 濡傛灉鏄?#28699;愮被甯?#37832;?#28103;?#37824;硅秴绫荤殑瀛楁
        • 閭?#28052;?#37832;濂?#37828;?#28003;跨敤瓒?#32491;荤殑鏋?#38315;犲櫒瀹炵幇鏀?#37721;?#38171;?
        • 鎴?#38000;?#38315;氳繃鎷?#37832;?#38003;?#28598;熸竻妤氳杈剧敤閫旂殑鍚嶅瓧?#27537;鍑?#37825;版潵瀹炵幇銆?
      • 濡傛灉淇?#37824;?#38342;?#37722;堝?#26945;?#30857;紝璇蜂?#36328;敤Encapsulate Collection锛?08锛?#28729;炵幇銆?

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

      鍔?#37832;猴細鏈?#28051;涓?#37713;?#37825;帮紝浠庢潵娌?#37832;夎浠?#28003;曠被璋冪敤
      鏂规硶?#32048;灏?#29831;?#37713;?#37825;?#29825;?#28051;簆rivate
      琛?#37711;咃細鍑?#37825;板彲瑙佸害涓?#28598;燂紝?#28266;缂?#29831;戠殑鏃?#37706;?#28751;?#37721;?#28000;?#37721;戠幇锛?#38000;屽嚱鏁?#26473;?#29785;佸害杩?#26946;橈紝鍒?#38343;瑕?#38315;氳繃涓浜涘伐鍏?#38171;Lint锛夋潵杈呭姪妫?#29025;銆?/p>

      10.12 Replace Constructor with Factory Method锛?#28000;?#23480;?#37720;傚嚱鏁板彇浠?#37835;?#38315;犲嚱鏁?#38171;?04

      鍔?#37832;猴細鍒涘?#21700;?#30789;薄鏃朵笉浠?#28000;?#37828;?#37707;氱畝鍗曠殑鏋勫?#21700;姩浣?#37826;规硶?#32048;灏嗘瀯閫犲嚱鏁版浛鎹?#28051;哄伐鍘傛?#32033;?#23510;渚嬶細

      • 鏍规嵁鏁存暟锛?#28729;?#38340;?#37828;?#32491;诲?#23340;爜锛?#37714;涘?#21700;?#30789;薄锛?
      • 鏍规嵁瀛?#32471;?#28051;?#37714;涘?#21700;?#24878;被瀵硅薄锛?
      • 浠?#37713;?#37825;?#37714;涘?#21700;?#24878;被锛?

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

      鍔?#37832;猴細?#28999;涓?#37713;?#37825;?#26473;?#37733;炵殑瀵硅薄?#32029;闇瑕?#37922;卞嚱鏁拌?#20906;敤鑰?#37813;?#29723;?#37722;?#28051;?#26462;瀷锛downcast锛?br>鏂规硶?#32048;灏?#37722;?#28051;?#26462;瀷绉?#37714;板嚱鏁?#28051;?/p>

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

      鍔?#37832;猴細?#28999;涓?#37713;?#37825;?#26473;?#37733;?#28051;涓?#37911;?#28729;氱殑浠爜?#32029;琛?#32448;烘煇涓敊璇殑鎯?#37712;?
      鏂规硶?#32048;鍙?#23057;堥偅涓?#28000;爜鍒?#37826;紝鏀圭敤鎶涘?#21700;?#20634;父
      ?#23510;渚嬶細

      • 闈炲彈鎺?#23534;傚父?#32048;浣跨敤瀹?#37719;?#29831;?#37721;?#22955;?#29025;杩?#28051;?#23534;傚父鎯?#37712;?#38171;?
      • ?#24392;鎺?#23534;傚父?#32048;闇瑕?#28103;?#37824;圭殑璋冪敤鑰呭嚱鏁板拰琚?#29835;冪敤鑰呭嚱鏁帮紝姝?#26976;?#28598;?#28598;紝瀹?#37828;撳嚭?#25930;銆?#37721;?#28000;?#37711;?#37714;涘缓涓涓?#28051;?#37827;剁殑涓棿鍑?#37825;帮紝淇濈暀?#24107;鍑?#37825;帮紝浣?#37813;鏈夌殑璋冪敤閮芥敼涓?#37826;板嚱鏁?#37722;庯紝鍒犻櫎?#24107;鍑?#37825;帮紝鍐?#28103;?#37824;?#37826;板嚱鏁?#37722;?#32457;帮紝鍗?#37721;?#37510;?

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

      鍔?#37832;猴細鏈?#29831;?#37922;辫?#20906;敤鑰呰嚜琛屾?#29025;?#27537;鏉?#28000;讹紝鐢辫璋冪敤鑰?#37814;涘嚭浜?#28051;涓?#37721;?#37818;?#23534;傚父銆?
      鏂规硶?#32048;淇?#37824;硅?#20906;敤鑰咃紝浣垮?#20904;湪璋冪敤鍑?#37825;?#28052;嬪?#23941;?#27693;?#29025;銆?
      琛?#37711;咃細寮傚父灏?#25652;?#29831;?#37824;惧湪鍙?#38003;藉?#25120;?#29111;?#20634;父?#27537;鍦版柟浣跨敤銆?#37719;?#37721;?#28000;?#26864;勬祴?#27537;?#32029;鍙?#28000;?#38315;氳繃妫?#29025;閬?#37711;嶇殑?#32029;閭?#28751;?#37828;敊璇紝涓?#29831;?#37721;戠敓锛?#28051;?#38003;?#26864;勬祴?#27537;?#32029;鏃犳硶閫氳繃妫?#29025;閬?#37711;嶇殑?#32029;閭?#28751;?#37828;?#23534;傚父銆?#28186;嬪?#20646;?#27699;̎鎴蜂?#27411;?#28614;皬浜庡彇閽?#37825;?#37929;紝鐢?#29831;?#37721;栭挶杩?#28051;?#28751;?#37828;敊璇?#38171;?#29840;?#37812;蜂?#27411;澶?#27996;庡彇閽?#37825;?#37929;紝鍙?#28051;嶅嚭閽辨潵灏?#37828;?#23534;傚父銆?/p>

      绗?1绔?澶勭悊姒傛嫭鍏?#32495;?319

      姒傛嫭鍏?#32495;?#38171;坓eneralization?#32029;鍗?#32513;?#37813;?#37711;?#32495;?#37510;?#23049;涘寲鍏?#32495;?#38171;?/p>

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

      鍔?#37832;猴細涓?#28051;?#28699;愮被鎷?#37832;夌浉鍚岀殑瀛楁
      鏂规硶?#32048;

      • 灏?#29831;?#28699;楁绉?#37716;?#37714;拌秴绫伙紝?#24147;?#27342;閲?#28598;?#37825;版嵁澹?#37828;?#38171;?
      • 灏?#28003;跨敤璇?#28699;楁?#30005;殑琛?#28051;烘惉绉?#37714;拌秴绫伙紝?#24147;?#27342;鍏?#27996;?#26473;?#28051;?#28699;楁?#30005;殑閲?#28598;?#29723;?#28051;?#37510;?
      • 鑰冭檻瀵硅秴绫荤殑璇?#28699;楁浣跨敤Self Encapsulate Field锛?71锛?

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

      鍔?#37832;猴細鏈?#27996;涘嚱鏁帮紝?#28266;鍚?#28051;?#28699;愮被浜?#37922;?#37929;?#37722;岀殑缁撴灉銆?br>鏂规硶?#32048;

      • 灏?#29831;?#37713;?#37825;?#32457;?#37716;?#37714;拌秴绫?
      • 濡傛?#28358;?#24385;鍗囩殑鍑?#37825;板紩?#25956;浜嗗?#24878;被涓殑鍑?#37825;?
        • 濡傛灉鍙?#28000;?#28751;嗗紩?#25956;鍑?#37825;版彁鍗囷紝灏?#28051;璧锋彁鍗?
        • 濡傛灉涓嶅彲浠?#28751;嗗紩?#25956;鍑?#37825;版彁鍗囷紝鍙?#28000;湪瓒?#32491;?#38322;岄潰閭?#28051;?#37814;借薄鍑?#37825;?

      11.3 Pull Up Constructor Body锛堟瀯閫犲嚱鏁?#37832;綋涓?#32457;?#38171;?25

      鍔?#37832;猴細浣犲湪鍚?#28051;?#28699;愮被鎷?#37832;?#28051;浜?#37835;?#38315;犲嚱鏁帮紝瀹?#28000;殑鏈?#37734;板嚑涔?#28729;?#37711;?#28051;鑷?br>鏂规硶?#32048;?#28266;瓒?#32491;?#37826;板缓涓涓?#37835;?#38315;犲嚱鏁帮紝骞跺湪瀛愮被鏋?#38315;犲嚱鏁?#28051;?#29835;冪敤瀹?#37510;?
      鍏蜂?#25780;?#35268;硶?#32048;

      • 灏?#37711;?#37722;?#28000;爜鏀惧湪瀛愮被鏋?#38315;犲嚱鏁拌?#23792;澶勶紝鐒?#37722;庡啀澶?#37714;?#37714;拌秴绫?#37835;?#38315;犲嚱鏁?#28051;?#37510;?
      • 灏嗗?#24878;被鏋?#38315;犲嚱鏁?#28051;?#37711;?#37722;?#28000;爜鍒犻櫎?#32029;鏀圭敤璋冪敤鏂板?#34425;殑瓒?#32491;?#37835;?#38315;犲嚱鏁?#37510;?

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

      鍔?#37832;?#38171;氳秴绫?#28051;殑?#28999;涓?#37713;?#37825;板彧涓?#38318;?#37714;?#38000;岄潪鍏?#38318;?#28699;愮被鏈?#37711;?br>鏂规硶?#32048;灏?#26473;?#28051;?#37713;?#37825;?#32457;?#37714;?#37929;?#37711;崇殑瀛愮被?#24147;銆?/p>

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

      鍔?#37832;?#38171;氳秴绫?#28051;殑?#28999;涓?#28699;楁鍙?#29722;?#38318;?#37714;?#38000;岄潪鍏?#38318;?#28699;愮被浣跨敤
      鏂规硶?#32048;灏?#26473;?#28051;?#28699;楁绉?#37714;?#38343;瑕?#28729;冪殑閭?#27996;涘?#24878;被?#24147;銆?/p>

      11.6 Extract Subclass锛堟?#24878;?#29006;?#24878;被锛?30

      鍔?#37832;猴細绫?#28051;殑?#28999;浜?#37911;?#37804;?#37721;?#29722;?#38318;?#37714;?#28729;?#28186;嬬敤鍒?#37510;?br>鏂规硶?#32048;鏂板缓涓涓?#28699;愮?#20249;紝灏?#28051;婇潰鎵璇寸殑閭?#28051;閮?#37714;嗙壒鎬?#32457;?#37714;板?#24878;被涓?#37510;?
      鍏蜂?#25780;儏鍐碉細

      • 骞朵笉鏄嚭?#24135;绫诲?#23340;爜灏?#29723;?#32448;?#38343;瑕佺敤鍒板?#24878;?#20249;紝鍙?#28000;湪濮?#37813;樺拰缁?#37813;?#28052;嬮棿鍋?#38315;?#37815;?#37510;?
      • 涓哄?#24878;被鏂板缓鏋?#38315;犲嚱鏁帮紝
        • 瀛愮被鏋?#38315;犲嚱鏁?#28051;?#29906;?#32491;?#37835;?#38315;犲嚱鏁版嫢鏈夌浉鍚岀殑鍙傛暟鍒楄?#32029;骞朵?#26050;?#23384;帴璋冪敤瓒?#32491;?#37835;?#38315;犲嚱鏁?
        • 濡傛灉闇瑕侀殣钘忓?#24878;?#20249;紝鍙?#28003;跨敤Replace Constructor with Factory Method锛?#28000;?#23480;?#37720;傚嚱鏁板彇浠?#37835;?#38315;犲嚱鏁?#38171;?
      • 鎵惧嚭瓒?#32491;?#29835;冪敤鐐?
        • 濡傛?#28358;秴绫?#37835;?#38315;犲嚱鏁?#28051;庡?#24878;被涓?#37722;岋紝閫氳繃rename method鏂规硶鍙?#28000;?#29785;?#37712;?#37510;?
        • 濡傛灉涓?#38343;瑕佽秴绫?#28729;?#28186;嬶紝鍙?#28000;?#28751;嗚秴绫诲鏄?#28051;?#37814;借薄绫?#37510;?
      • 閫?#28051;浣跨敤鍑?#37825;?#28051;?#32457;?#37724;屽?#26945;涓?#32457;?#28751;?#23143;愮?#33636;殑鐗?#37804;?#32457;?#37716;?#37714;板?#24878;被銆?

      11.7 Extract Superclass锛堟?#24878;偧瓒?#32491;?#38171;?36

      鍔?#37832;猴細涓?#28051;?#32491;?#37832;夌浉浼?#37911;?#37804;?#37510;?
      鏂规硶?#32048;涓?#28051;?#28051;?#32491;诲缓绔?#28051;涓?#29906;?#32491;伙紝灏?#37929;?#37722;岀壒鎬?#32457;?#38007;宠秴绫?#37510;?
      琛?#37711;咃細Extract Class?#32029;Extract Subclass?#32029;Extract Superclass瀵规?#26047;涔?#37510;?/p>

      11.8 Extract Interface锛堟?#24878;?#20860;帴鍙?#38171;?41

      鍔?#37832;猴細澶?#28051;敤鎴?#37721;?#28003;跨敤绫绘帴鍙?#28051;殑鍚?#28051;?#29913;闆嗭紝鎴?#38000;?#28051;?#28051;?#32491;荤殑?#24116;鍙?#37832;?#38318;?#37714;?#37929;?#37722;?#37510;?
      鏂规硶?#32048;灏?#37929;?#37722;屽瓙闆嗘?#24878;?#29006;埌鐙?#32468;嬬殑?#24116;鍙?#28051;?#37510;?
      ?#23599;鍒細鎻愮偧瓒?#32491;?#37828;?#37819;愮偧鍏?#37722;?#28000;爜?#32029;鎻愮?#20860;帴鍙?#37827;舵?#24878;偧鍏?#37722;屾帴鍙?#37510;?br>鍏蜂綋鍔?#37832;猴細濡傛灉?#28999;涓?#32491;诲湪涓?#37722;?#37916;?#28583;?#28051;?#37813;?#23125;?#37812;?#37906;朵笉鍚岀殑瑙掕?#35815;紝浣跨敤?#24116;鍙?#28751;?#37828;?#28051;?#28610;?#28051;?#37808;?#37510;傛帴鍙?#26473;樿?#34249;府鍔?#32491;婚殣钘?#28051;浜涘澶栫殑鍑?#37825;版帴鍙?#37510;?/p>

      11.9 Collapse Hierarchy锛?#37814;?#37721;犵户鎵夸綋绯?#38171;?44

      鍔?#37832;?#38171;氳秴绫?#37724;屽?#24878;被涔嬮棿?#23599;鍒?#28051;?#28598;?#37510;?
      鏂规硶?#32048;灏?#28729;?#28000;?#37722;?#28051;?#28051;?#32139;銆?/p>

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

      鍔?#37832;猴細浣?#37832;?#28051;浜涘?#24878;?#20249;紝鍏朵腑鐩?#25652;旂殑鍑?#37825;?#28000;?#37929;?#37722;?#26916;哄簭鎵?#29723;?#32491;?#28028;肩殑鎿?#28003;滐紝浣?#37722;?#28051;?#37823;?#28003;滅殑缁?#38010;?#37832;?#37813;涓?#37722;?#37510;?br>鏂规硶?#32048;灏?#26473;?#27996;涘皬鎿?#28003;?#37714;?#37714;?#37824;?#26473;?#37913;?#32468;嬪嚱鏁?#28051;紝骞朵?#28615;寔瀹?#28000;?#38318;?#37832;夌浉鍚岀殑绛?#37722;嶏紝浜?#37828;師鍑?#37825;?#28052;熷彉寰?#37929;?#37722;?#27996;?#37510;?#37906;?#37722;庡?#21975;師鍑?#37825;?#28051;?#32457;?#38007;宠秴绫伙紝杩愮敤澶?#37804;佹潵閬?#37711;?#38322;?#28598;?#28000;爜銆?#26473;?#37837;风殑?#24107;鍑?#37825;板氨鏄疶emplate Method銆?
      ?#24107;鍥?#38171;氳?#30028;?#26421;?#36328;敤浜?#32513;?#37813;匡紝浣?#37828;?#37713;?#37825;?#38322;?#28598;?#25652;?#28751;?#38322;?#38316;?#37711;?#37510;?/p>

      11.11 Replace inherited with Delegation锛?#28000;?#28654;?#37813;?#37721;?#28000;?#32513;?#37813;?#38171;?52

      鍔?#37832;猴細?#28999;涓?#28699;愮被鍙?#28003;跨敤瓒?#32491;绘帴鍙?#28051;?#28051;閮?#37714;嗭紝鎴?#37828;?#37837;?#37832;?#28051;?#38343;瑕?#32513;?#37813;?#38000;屾潵?#27537;鏁版嵁鏂规硶?#32048;?#28266;瀛愮被涓?#37826;板缓涓涓?#28699;楁?#30005;敤浠?#28103;?#28699;樿秴绫伙紝璋?#37825;村?#24878;被鍑?#37825;帮紝浠?#28729;?#28654;?#37813;樿秴绫伙紝鐒?#37722;庡幓鎺?#28051;?#38000;?#28052;嬮棿?#27537;缁?#37813;?#37711;?#32495;?#37510;?/p>

      11.12 Replace Delegation with Inherited锛?#28000;?#32513;?#37813;垮彇浠?#28654;?#37813;?#38171;?52

      鍔?#37832;猴細?#28266;涓?#28051;?#32491;?#28052;嬮棿浣跨敤濮?#37813;?#37711;?#32495;伙紝骞剁?#24531;父涓?#37825;?#28051;帴鍙?#32514;?#37712;?#29825;?#28598;氭?#20346;畝鍗曠殑濮?#37813;樺嚱鏁帮紝鏂规硶锛氳濮?#37813;?#32491;?#32513;?#37813;垮彈鎵?#32491;?#37510;傛敞鎰忥細

      • 濡傛灉骞?#23052;?#37832;?#28003;跨敤?#24392;鎵?#32491;荤殑鎵鏈夊嚱鏁帮紝閭?#28052;?#28751;?#28051;?#29781;佷?#36328;敤杩?#28051;?#37826;规硶銆?#37733;?#28051;哄?#24878;被搴?#29831;?#37804;?#37828;?#38316;?#23536;?#29906;?#32491;荤殑?#24116;鍙紝濡傛灉濮?#37813;樿繃澶?#37721;?#28000;?#38315;氳繃Remove Middle Man锛?60锛?#37826;规硶璁?#28729;?#37812;风璋冪敤?#24392;鎵樺嚱鏁帮紝鎴?#38000;匛xtract Superclass锛?36锛?#29825;?#28051;?#28051;?#32491;荤殑?#24116;鍙?#37819;愮?#29006;埌瓒?#32491;?#28051;?#38171;?#26473;?#37721;?#28000;?#28003;跨敤Extract Interface锛?41锛?#37826;规硶銆?
      • 濡傛灉?#24392;鎵?#28725;硅薄琚?#28051;?#23005;?#28051;涓?#37711;朵粬瀵硅薄鍏?#27996;紝鑰?#28051;斿彈鎵?#28725;硅薄鏄?#37721;?#37721;樼殑鏃?#37706;欙紝閭?#28052;?#26473;?#32457;嶆儏鍐?#28051;嬶紝涓?#38003;藉?#21975;鎵?#37711;?#32495;?#37831;?#37817;?#28051;?#32513;?#37813;?#37711;?#32495;伙紝鍥?#28051;?#26473;?#37837;?#28751;?#37827;犳硶鍏?#27996;?#37825;版嵁浜?#37510;傛?#29256;嵁鍏?#27996;?#37828;?#28654;?#37813;?#37711;?#32495;荤殑涓绉?#38322;?#29781;佸姛鑳?#37510;?


    • ]]>
      銆?#38322;?#37835;勩嬬殑璇?#28052;?#32471;?#29825;?/title><link>http://www.5432034.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.5432034.com/zhuyuanxiang/archive/2019/01/16/433604.html</guid><wfw:comment>http://www.5432034.com/zhuyuanxiang/comments/433604.html</wfw:comment><comments>http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433604.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/zhuyuanxiang/comments/commentRss/433604.html</wfw:commentRss><trackback:ping>http://www.5432034.com/zhuyuanxiang/services/trackbacks/433604.html</trackback:ping><description><![CDATA[<li><a href="#鎬?#29785;?>鎬?#29785;?/a> <li><a href="#绗?绔?閲?#37835;勭涓涓?#22935;?#28186;?>绗?绔?閲?#37835;勶紝绗?#28051;涓?#22935;?#28186;?/a> <ul> <li><a href="#11-p1璧风偣">1.1 (P1)璧风偣</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涓?#28003;?#38322;?#37835;?>2.2 (P55)涓?#28003;?#38322;?#37835;?/a> <li><a href="#23-p57浣?#37827;堕噸鏋?>2.3 (P57)浣?#37827;堕噸鏋?/a> <li><a href="#24-p60鎬?#28052;?#28725;?#32513;忕悊璇?>2.4 (P60)鎬?#28052;?#28725;?#32513;忕悊璇?/a> <ul> <li><a href="#?#26879;?#24116;璁?#38338;?>?#26879;?#24116;璁?#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;庢?#38003;?>2.7 (P69)閲?#37835;?#28051;庢?#38003;?/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杩?#28598;殑绫?>3.3 (P78)Large Class锛?#26473;?#28598;殑绫?#38171;?/a> <li><a href="#34-p78long-parameter-list杩?#38336;垮?#20635;暟鍒?>3.4 (P78)Long Parameter List锛?#26473;?#38336;垮?#20635;暟鍒?#38171;?/a> <li><a href="#35-p79divergent-change鍙?#37825;紡鍙樺寲">3.5 (P79)Divergent Change锛?#37721;?#37825;紡鍙樺寲锛?/a> <li><a href="#36-p80shotgun-surgery闇板?#29808;紡淇?#37824;?>3.6 (P80)Shotgun Surgery锛?#38343;板?#29808;紡淇?#37824;?#38171;?/a> <li><a href="#37-p80feature-envy渚?#37805;嬫儏缁?>3.7 (P80)Feature Envy锛?#28186;?#37805;嬫儏缁?#38171;?/a> <li><a href="#38-p81data-clumps鏁版嵁娉?#37733;?>3.8 (P81)Data Clumps锛堟?#29256;嵁娉?#37733;?#38171;?/a> <li><a href="#39-p81primitive-obsession鍩?#37832;?#32491;诲瀷鍋?#37813;?>3.9 (P81)Primitive Obsession锛堝熀鏈?#32491;诲瀷鍋?#37813;?#38171;?/a> <li><a href="#310-p82switch-statementsswitch鎯婃?#27697;幇?#38889;">3.10 (P82)Switch Statements锛坰witch鎯婃?#27697;幇?#38889;锛?/a> <li><a href="#311-p83parallel-inheritance-hierarchies骞宠缁?#37813;夸綋绯?>3.11 (P83)Parallel Inheritance Hierarchies锛?#39582;宠缁?#37813;夸綋绯?#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;殑?#27535;鏃?#28699;楁">3.14 (P84)Temporary Field锛?#28000;?#27996;?#26473;锋?#25120;殑?#27535;鏃?#28699;楁锛?/a> <li><a href="#315-p84message-chains杩?#25652;?#38000;?#37722;堢殑娑堟伅閾?>3.15 (P84)Message Chains锛?#26473;?#25652;?#38000;?#37722;堢殑娑堟伅閾?#38171;?/a> <li><a href="#316-p85middle-man涓棿浜?>3.16 (P85)Middle Man锛?#28051;棿浜?#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寮傛洸鍚屽伐?#27537;绫?>3.18 (P85)Alternative Classes with Different Interfaces锛?#23534;傛洸鍚屽伐?#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杩?#28598;氱殑?#25950;閲?7">3.22 Comments锛?#26473;?#28598;氱殑?#25950;閲?#38171;?7</a> </li></ul> <li><a href="#绗?绔?鏋勭?#25118;祴璇曚綋绯?>绗?绔?鏋勭?#25118;祴璇曚綋绯?/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;?#28598;氭祴璇?7">4.3 娣?#37716;?#37831;?#28598;氭祴璇?7</a> </li></ul> <li><a href="#绗?2绔?澶瀷閲?#37835;?59">绗?2绔?澶瀷閲?#37835;?59</a> <li><a href="#绗?3绔?閲?#37835;?#28598;嶇敤涓庣幇瀹?79">绗?3绔?閲?#37835;勶紝澶嶇敤涓庣幇瀹?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;勩嬬殑璇?#28052;?#32471;?#29825;?/h2> <h3 id="瀛?#28052;犲?#34425;">瀛?#28052;犲?#34425;?#32048;</h3> <p>鐔熸倝銆?#29825;?#29825;?#22959;紡銆嬬殑鍩?#37832;?#22994;傚康?#32029;鐔熸?#22794;熀鏈殑Java璇硶?#32029;鐔熸倝Eclipse鍜孞Unit?#27537;浣跨敤?#32029;鏈夌浉瀵硅緝濂界殑鑻?#29831;?#37737;虹銆?/p> <h3 id="瀛?#28052;?#26473;囩">瀛?#28052;?#26473;囩?#23350;細</h3> <ul> <li>鍏堢湅绗?绔狅紝鎵?#23480;緭鍏?#28729;?#28186;嬬搴忥紝浜?#29785;?#38322;?#37835;勭殑鏂规硶鍜?#26473;囩銆傞噸鐐?#37828;悊瑙?#38322;?#37835;勭殑鎬?#29882;紝鏈濂界殑?#24714;瑙?#37826;瑰紡灏?#37828;?#38315;氳繃瀹?#29882;电殑鏂瑰紡?#24714;瑙?#37510;? <li>鍐嶇湅绗?~4绔狅紝鍐?#28729;?#28051;?#38315;?#37815;?#37804;?#38339;?#29831;伙紝娌?#37711;磋鎴?#38000;呯湅涓嶆?#20636;殑閮藉彲浠?#29882;?#26473;囷紝鍥?#28051;?#37722;庨潰杩?#37721;?#28000;?#37733;?#28598;?#37712;?#29831;?#37510;? <li>?#24116;鐫绗?~12绔狅紝鏈濂芥寜椤哄簭鎶?#28000;爜涓涓?#28051;緭鍏紝鍐嶆?#22796;収浣?#38000;呯殑姝?#26976;?#38322;?#37835;勬搷浣?#28051;娆紝骞剁粨鍚堣嚜宸?#28000;?#23536;宸?#28003;?#28051;殑瀹?#29882;?#37833;悊瑙?#37510;?</li></ul> <h3 id="瀛?#28052;犵洰?#27537;">瀛?#28052;犵洰?#27537;?#32048;</h3> <p>浣胯嚜宸辩紪鍐欑殑浠爜鏇?#28729;?#37828;?#29722;?#27996;?#29831;?#37811;?#37510;?/p> <h3 id="瀛?#28052;?#37808;熸偀">瀛?#28052;?#37808;熸偀?#32048;</h3> <ul> <li>浠爜?#27537;閲?#37835;?#25652;?#29831;?#37828;?#28051;姝?#23005;?#28729;?#37812;愮殑?#32029;?#30241;娆?#38322;?#37835;勭殑閮?#37714;?#28051;?#29781;佽秴杩囪嚜宸辩殑?#24714;瑙?#38003;藉姏?#27537;5%銆傝?#30028;劧杩?#37837;锋搷浣滅暐鏄剧箒鐞愶紝浣?#37828;?#37721;?#28000;?#37713;?#26462;?#28598;磋剳閲?#37835;?#26473;囩涓殑璁板繂寮哄害?#32029;鍑忓皯浠爜?#22189;?#25930;?#27537;鏈?#28028;?#37510;? <li>浠爜?#27537;閲?#37835;?#28051;瀹氳?#20352;厤鍚JUnit锛圱DD?#32029;?#31092;璇曢鍔?#23534;鍙?#38171;?#28729;?#37812;愶紝鍐嶅姞涓Git锛堢増鏈?#32480;悊锛夊拰Eclipse锛圛DE?#27537;閲?#37835;勫伐鍏?#38171;夐偅灏?#27996;?#37719;婂?#29111;?#27996;?#37510;?</li></ul> <h3 id="瀛?#28052;?#28000;爜">瀛?#28052;?#28000;爜?#32048;</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;夛紝浠?#28729;?#28186;嬬搴忓?#21700;彂?#32029;浜?#29785;?#38322;?#37835;勭殑鏂规硶鍜?#26473;囩銆? <li>绗?绔狅紝璁?#29825;?#38322;?#37835;勭殑涓鑸?#37804;師鍒?#37510;?#28729;?#28052;夊拰杩?#29723;?#38322;?#37835;勭殑?#24107;鍥?#37510;? <li>绗?绔狅紝浠?#32513;嶅浣?#37714;?#37826;?#38338;?#26864;?#28000;爜?#32029;浠?#37721;婂浣曠敤閲?#37835;勬?#29808;杽瀹?#28000;?#37510;? <li>绗?绔狅紝?#28266;浠爜涓?#37835;勫缓java?#27537;?#31092;璇?#37916;?#28583;? <li>绗?~12绔狅紝鍏蜂綋?#28528;瀵圭殑闂?#26864;樺拰閲?#37835;勭殑鏂规硶銆? <li>绗?3绔狅紝Bill Opdyke?#28266;鍟?#28051;?#23534;鍙?#28051;?#25652;旂敤閲?#37835;? <li>绗?4绔狅紝?#22172;鍔寲閲?#37835;勫伐鍏?#38171;?#28000;婂鐪嬫潵?#32029;宸?#32513;?#28051;?#37828;?#28598;?#28598;?#38338;?#26864;橈紝Eclipse?#27537;Refactor宸?#32513;?#38344;炲父濂界敤锛? <li>绗?5绔狅紝閲?#37835;勭殑鍝?#28699;?#37804;濇兂 </li></ul> <h2 id="绗?绔?閲?#37835;勭涓涓?#22935;?#28186;?>绗?绔?閲?#37835;勶紝绗?#28051;涓?#22935;?#28186;?/h2> <h3 id="11-p1璧风偣">1.1 (P1)璧风偣</h3> <p>鍥?#28051;?#28000;爜?#27537;缁撴瀯鏃犳硶?#24359;瓒虫坊鍔?#37826;板姛鑳界殑闇瑕侊紝鍥?#23005;?#37711;?#26473;?#29723;?#38322;?#37835;勶紝浣?#28000;爜鏂逛究娣?#37716;?#37826;板姛鑳斤紝鐒?#37722;庡啀娣?#37716;?#37826;板姛鑳?#37510;?/p> <h3 id="12-p7閲?#37835;勭殑绗?#28051;姝?>1.2 (P7)閲?#37835;勭殑绗?#28051;姝?/h3> <p>棣?#37711;堢璁嚜宸?#37815;?#37832;?#28051;濂?#37721;?#38344;犵殑?#31092;璇?#37832;哄?#35769;紝鍥?#28051;?#38322;?#37835;?#37832;?#37721;?#38003;藉紩鍏?#38338;?#26864;橈紝閫氳繃?#31092;璇?#28103;?#29831;?#38322;?#37835;?#23052;?#37832;夋敼鍙?#32459;?#25652;忓姛鑳?#37510;?/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;夛細瀵?#26462;?#28000;?#37712;?#38318;?#32513;撴?#21229;殑涓绉嶈皟鏁达紝鐩殑鏄湪涓嶆敼鍙樿蒋浠?#37721;?#29785;?#28725;?#29723;?#28051;虹殑?#22688;?#24385;涓嬶紝?#24385;楂樼悊瑙?#37804;?#37724;岄檷浣?#28103;?#37824;?#37812;?#37832;?#37510;?<br>閲?#37835;?#38171;堝姩璇?#38171;夛細浣跨敤涓绯?#37714;?#38322;?#37835;?#37813;嬫硶?#32029;?#28266;涓嶆敼鍙樿蒋浠?#37721;?#29785;?#28725;?#29723;?#28051;虹殑?#22688;?#24385;涓嬶紝璋?#37825;?#37711;剁?#25780;?#21225;?br>瀹?#28052;夌殑鎵?#28766;曪細</p> <ul> <li>閲?#37835;勮杞?#28000;?#37831;?#28729;?#37828;撶悊瑙?#37724;?#28103;?#37824;? <li>閲?#37835;?#28051;?#28028;氭敼鍙樿蒋浠剁殑鍙?#29785;?#28725;?#29723;?#28051;猴紝鍗?#28003;?#37824;?#37721;?#28052;熷彧鑳?#37828;井?#30380;?#27537;褰?#37725;嶏紝杞?#28000;?#37716;?#38003;?#28051;濡?#37827;?#23536;銆?</li></ul> <p>閲?#37835;勭殑鐩?#37837;囷細鍙?#37824;?#37721;?#32459;?#25652;?#37712;?#38318;?#32513;撴瀯?#32029;涓嶆坊鍔犳柊?#27537;鍔?#38003;?/p> <p>涓?#29781;?#28051;蹇?#27996;岀敤?#32048;</p> <ul> <li>娣?#37716;?#37826;板姛鑳界殑鏃?#37706;欙紝涓?#38322;?#37835;勫凡鏈?#28000;爜銆? <li>閲?#37835;?#28000;爜鏃讹紝涓嶅?#28850;姞鏂板姛鑳?#37510;?</li></ul> <h3 id="22-p55涓?#28003;?#38322;?#37835;?>2.2 (P55)涓?#28003;?#38322;?#37835;?/h3> <ul> <li>閲?#37835;勬敼杩?#26462;?#28000;?#29825;?#29825;細 <ul> <li>绋?#25652;忕殑璁?#29825;?#29840;?#38322;忓湪娌?#37832;夋寔缁?#38322;?#37835;勭殑鎯?#37712;?#28051;?#38315;愭笎鍙?#23480;紝鍔?#38003;界殑澧炲姞鎴?#38000;?#28103;?#37824;?#38318;藉彲鑳戒娇浠爜瓒婃潵瓒婇毦浠悊瑙?#37724;?#32513;?#37814;紝灏辫?#23111;毦淇?#29831;?#37832;鍒濈殑璁?#29825;?#37929;?#37837;? <li>娑堥櫎閲?#28598;嶇殑浠爜涓鏂归潰鏄?#32459;?#25652;?#26473;?#29723;屾?#26449;揩?#32029;涓鏂归潰鏄?#37826;逛究鏈?#37833;殑淇?#37824;癸紝渚嬪?#20646;細閲?#37835;勫?#24531;皯浠爜閲?#28598;嶏紝閬?#37711;嶅姛鑳界殑鏀?#37721;?#38343;瑕?#28103;?#37824;?#28598;?#28598;?#28000;爜銆?</li></ul> <li>閲?#37835;?#28003;?#26462;?#28000;?#37831;?#28729;?#37828;撶悊瑙細 <ul> <li>鍙?#37827;跺琛?#37413;滄兂瑕?#28729;?#37707;?#28000;涔?#37413;?#37724;?#37413;滃憡璇?#28729;?#37707;?#28000;涔?#37413;?#28052;嬮棿?#27537;缂濋殭銆傞噸鏋勭殑鏍?#36423;?#28751;?#37828;?#29781;?#37413;?#37713;嗙璇村嚭鎴?#37813;瑕佺殑鈥? <li>閲嶆柊闃?#29831;?#28000;爜?#27537;浜?#37832;?#37721;?#38003;?#37828;嚜宸紝涔熷彲鑳?#37828;粬浜?#37510;? <li>閫氳繃閲?#37835;?#37721;?#28000;?#37814;婅嚜宸?#28051;?#37908;熸?#22796;殑浠爜?#27537;?#25956;閫旀?#23815;悊涓閬嶏紝鍔犳繁瀵?#28000;爜?#27537;?#24714;瑙?</li></ul> <li>閲?#37835;?#29999;?#37716;?#37813;惧嚭bug?#32048; <ul> <li>杩?#28051;?#37828;缓绔嬪湪浠爜瀹?#37828;撶悊瑙?#28052;?#28051;婄殑 </li></ul> <li>閲?#37835;勬彁楂?#32514;?#32459;?#38315;?#25652;細 <ul> <li>閲?#37835;勮揪鍒拌壇濂界殑璁?#29825;紝鑰岃壇濂界殑璁?#29825;?#37831;?#28729;?#37828;?#28103;?#37824;?#28000;爜銆佸?#28850;?#29362;姛鑳?#37510;?#38338;?#26864;樿皟璇?#37510;?</li></ul></li></ul> <h3 id="23-p57浣?#37827;堕噸鏋?>2.3 (P57)浣?#37827;堕噸鏋?/h3> <p>閲?#37835;勭殑涓夋?#30838;鍒欙細</p> <ul> <li>绗?#28051;娆?#23534;鍙戞煇涓?#37716;?#38003;界殑鏃?#37706;?#28000;?#28729;炵幇涓?#37929;?#37837;?#37510;? <li>绗?#27996;屾寮鍙戠浉鍚屽姛鑳界殑鏃?#37706;欙紝鍏?#37714;惰嚜宸辩殑鍙?#37808;燂紝缁?#32513;?#38322;?#28598;?#28729;炵幇銆? <li>绗?#28051;夋寮鍙戠浉鍚屽姛鑳界殑鏃?#37706;欙紝搴?#29831;?#38322;?#37835;勩?</li></ul> <p>閲?#37835;勭殑鏃堕棿鐐癸細</p> <ul> <li>娣?#37716;犲姛鑳?#37827;堕噸鏋勶細 <ul> <li>涓鏂归潰鍙?#28000;?#29999;?#37716;悊瑙?#38343;瑕?#28103;?#37824;圭殑浠爜 <li>涓鏂归潰鏄?#28003;跨幇?#28266;浠?#37721;?#37832;?#37833;?#28583;炲姞鏂板姛鑳?#37831;村姞瀹?#37828;?#37510;?</li></ul> <li>淇?#29723;敊璇?#37827;堕噸鏋勶細 <ul> <li>?#22189;?#24135;bug?#27537;鏃?#37706;欙紝?#27622;浠?#37813;惧嚭闂?#26864;?#37813;?#28266;?#27537;鏃?#37706;欙紝寰?#37832;?#37721;?#38003;?#37828;?#28000;爜涓嶆竻鏅板鑷存煡鎵bug?#27537;鍥伴毦銆?</li></ul> <li>澶?#28729;?#28000;爜鏃堕噸鏋勶細 <ul> <li>澶?#28729;?#28000;爜鏈夊姪浜庣煡璇嗙殑浼犳挱?#32029;鏈?#37714;?#27996;?#28000;爜琚?#32514;?#37712;?#38000;?#28052;?#28598;栫殑浜虹悊瑙?#37510;? <li>閲?#37835;勫?#29363;繁浜?#28725;?#28000;爜?#27537;?#24714;瑙紝鏈?#37714;?#27996;庢彁鍗?#28598;?#28729;?#28000;爜?#27537;鑳藉姏 </li></ul></li></ul> <p>澶?#28729;?#37733;?#38339;燂細鍙?#29781;?#28000;爜浣?#38000;呭拰涓涓?#28729;煡鑰?#38000;?#37510;傝緝澶殑椤?#37929;?#37721;?#28000;?#38315;氳繃UML鍥惧幓灞?#32448;?#28000;爜?#27537;閫昏緫銆?/p> <p>绋?#25652;忛毦浠?#28103;?#37824;圭殑?#24107;鍥狅細</p> <ul> <li>?#27622;浠?#38339;?#29831;荤殑绋?#25652;? <li>閫昏緫閲?#28598;嶇殑绋?#25652;? <li>娣?#37716;犳柊鐗?#37804;?#38343;瑕?#28103;?#37824;?#23480;?#37832;?#28000;爜?#27537;绋?#25652;? <li>甯?#28598;嶆潅閫昏緫鍒?#37826;殑绋?#25652;?</li></ul> <p>閲?#37835;勭殑鐩?#37837;囷細</p> <ul> <li>浠爜瀹?#37828;?#38339;?#29831;? <li>鎵鏈?#38315;昏緫閮藉彧鏈夊敮涓鍦?#37904;规寚瀹? <li>?#26570;?#27537;鏀?#37716;?#28051;?#28028;?#37719;?#37721;婄幇鏈夎涓? <li>灏藉彲鑳界畝鍗?#29723;?#26440;?#38315;昏緫 </li></ul> <h3 id="24-p60鎬?#28052;?#28725;?#32513;忕悊璇?>2.4 (P60)鎬?#28052;?#28725;?#32513;忕悊璇?/h3> <ul> <li>鎳?#37814;鏈殑缁忕悊?#32029;寰?#28729;?#37828;撴閫?#38171;? <li>杩?#23033;傝川閲忕殑缁忕悊?#32029;浠?#32513;?#38322;?#37835;?#28725;硅川閲忕殑甯?#37716;?#38171;? <li>杩?#23033;?#26473;涘害?#27537;缁忕悊?#32029;鍒欒嚜宸?#28729;?#38344;?#37734;?#38322;?#37835;勩?#37733;?#28051;?#38322;?#37835;?#37721;?#28000;?#37832;?#25577;?#27537;瀹?#37812;?#28000;诲姟?#32029;灏?#37828;?#28725;?#32513;忕悊鏈澶殑甯?#37716;?#37510;?</li></ul> <h4 id="?#26879;?#24116;璁?#38338;?>?#26879;?#24116;璁?#38338;?/h4> <p>寰?#28598;?#37827;?#37706;?#38322;?#37835;?#38318;?#28051;虹搴忓紩鍏棿?#24116;璁?#38338;細</p> <ul> <li>鎶婂?#28727;瀵硅薄鎷?#37714;?#37812;愬皬瀵硅薄 <li>鎶婂鍨嬪嚱鏁版媶鍒?#28051;哄?#24531;?#23338;嚱鏁?#37510;?</li></ul> <p>?#26879;?#24116;璁?#38338;殑浠?#37706;硷細</p> <ul> <li>鍏佽閫昏緫鍏?#27996;細涓涓?#37713;?#37825;板湪涓?#37722;?#37734;?#37904;硅璋冪敤銆?#28699;愮被鍏?#27996;?#29906;?#32491;荤殑鏂规硶銆? <li>鍒?#23534;瑙?#38322;?#37808;?#37733;惧拰瀹炵幇?#32048;閫氳?#22249;被鍚嶅?#23677;嚱鏁?#37722;?#29785;?#38322;婅嚜宸辩殑鎰?#37733;? <li>闅旂鍙樺寲?#32048;?#28266;涓?#37722;?#37734;版柟浣跨敤鍚?#28051;涓?#28725;硅薄?#32029;闇瑕?#28103;?#37824;?#28051;澶?#38315;昏?#25135;紝閭?#28052;?#37721;?#28000;?#37707;?#37713;哄?#24878;?#20249;紝骞跺湪闇瑕佺殑鏃?#37706;?#28103;?#37824;?#26473;?#28051;?#28699;愮被銆? <li>灏佽鏉?#28000;堕昏緫锛氳?#24878;敤澶?#37804;?#37510;?#28751;嗘潯浠堕昏緫杞寲涓?#23057;堟伅妯紡銆?</li></ul> <p>鍑忓?#25126;棿?#24116;?#30512;?#27537;鏉?#28000;??#32139;?#26879;?#24116;?#30512;鍙湪涓澶?#28003;跨敤?#32029;閭?#28052;?#38343;瑕佸皢鍏?#23057;堥櫎銆?/p> <h3 id="25-p62閲?#37835;勭殑?#27622;棰?>2.5 (P62)閲?#37835;勭殑?#27622;棰?/h3> <p>鏁版嵁搴?#38322;?#37835;勶細</p> <ul> <li>瀛樺湪闂?#26864;橈細 <ul> <li>绋?#25652;?#28051;庢?#29256;嵁搴?#38000;?#37722;堝湪涓璧?#37510;? <li>鏁版嵁杩?#32457;?#37510;?</li></ul> <li>瑙?#37712;虫?#35268;?#22572;細 <ul> <li>?#28266;闈?#37711;?#32495;诲瀷鏁版嵁搴擄紝鍙?#28000;湪鏁版嵁搴?#37724;?#28725;硅薄妯瀷涓?#37819;?#37711;?#28051;涓?#37714;嗙灞傦紝闅旂涓?#38000;?#28052;嬮棿?#27537;鍙樺寲 </li></ul></li></ul> <p>?#24116;鍙?#38322;?#37835;?/p> <ul> <li>瀵?#27996;庡凡缁?#37721;?#29999;冪殑?#24116;鍙?#38343;瑕佸彲鑳?#38343;瑕?#32513;?#37814;?#37827;帴鍙?#37724;屾?#29256;帴鍙紝?#25956;deprecated淇饰鏃帴鍙?#37510;? <li>涓嶅彂甯?#37826;版帴鍙紝?#28266;鏃帴鍙?#28051;?#29835;冪敤鏂版帴鍙?#37510;? <li>鍋囧?#20635;?#29256;帴鍙?#37814;涘嚭缂?#29831;?#37827;?#23534;傚父?#32029;閭?#28052;?#37721;?#28000;湪鏃帴鍙?#28051;?#29835;冪敤鏂版帴鍙?#39582;?#28751;嗙紪璇?#37827;?#23534;傚父杞寲涓?#26473;?#29723;?#37827;?#23534;傚父銆?</li></ul> <p>涓?#38322;?#37835;勭殑鏉?#28000;讹細</p> <ul> <li>閲?#37835;?#28052;嬪墠?#32029;浠爜?#28266;澶?#38318;?#37714;嗘儏鍐?#28051;?#38318;借兘澶?#23005;父杩?#29723;岋紝灏?#37721;?#28000;?#38322;?#37835;勶紝鍚?#37714;?#25652;?#29831;?#37828;?#38322;?#37712;?#37510;? <li>鍒?#27996;Deadline?#32029;搴?#29831;?#38316;?#37711;?#38322;?#37835;勩?</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;殑?#32048;</p> <ul> <li>璁?#29825;?#25652;?#29831;湪缂栫爜涔嬪墠?#32029;浣?#37828;?#29825;?#29825;?#37804;?#37832;夌己闄凤紝?#27554;鐫瀵?#38338;?#26864;樿璇嗙殑閫愭?#24877;繁鍏紝閫氳繃閲?#37835;?#37721;?#28000;?#37824;瑰?#21230;璁殑璐?#38322;?#37510;? <li>閲?#37835;勫噺杞?#27996;?#29825;?#29825;殑?#27622;搴?#37724;屽帇鍔涳紝?#28266;绋?#25652;?#28051;?#37826;?#28103;?#37824;圭殑杩囩涓?#38315;?#23005;?#28729;屽?#21229;搴忕殑璁?#29825;?#37510;?</li></ul> <h3 id="27-p69閲?#37835;?#28051;庢?#38003;?>2.7 (P69)閲?#37835;?#28051;庢?#38003;?/h3> <p>閲?#37835;?#37828;?#37832;?#37721;?#38003;藉鑷寸搴?#26473;?#29723;?#37721;樻參?#27537;?#32029;浣?#37828;?#28051;?#38343;瑕佸湪璁?#29825;?#37724;岀紪?#29212;鏃?#28751;?#38000;冭檻鎬?#38003;?#38338;?#26864;?#37510;?#28186;嬪?#20646;細瀹?#37827;剁搴忕殑缂?#37712;欙細</p> <ul> <li>棣?#37711;?#37712;?#37713;哄彲璋冪殑绋?#25652;? <li>鐒?#37722;?#29835;?#37825;?#28729;?#28000;?#26440;?#37714;版?#38003;界殑瑕?#23033;?#37510;? <ul> <li>缁?#26473;?#37714;嗘瀽澶?#38318;?#37714;嗙搴忕殑涓?#29781;?#37827;堕棿鏄?#23057;?#38000;楀湪?#30380;閮?#37714;?#28000;爜涓紝鎵浠?#28051;嶇敤瀵?#37813;鏈?#28000;爜杩?#29723;?#28028;樺寲銆? <li>鎬?#38003;?#28028;樺寲鏀惧湪寮鍙戠殑鍚?#37832;燂紝鍒敤鍒嗘瀽宸?#37711;锋?#24807;嚭娑?#38000;?#28598;?#38322;?#37827;堕棿?#27537;浠爜?#32029;鐒?#37722;庨泦涓?#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;板?#27194;湪鐩?#37722;岃杈惧紡?#32048;Extract Method锛堟?#24878;?#29006;嚱鏁?#38171;? <li>浜?#28051;?#37711;?#23534;熺被鍐呭?#27194;湪鐩?#37722;岃杈惧紡?#32048; <ul> <li>Extract Method鈫扨ullUp Method锛堝嚱鏁?#28051;?#32457;?#38171;? <li>濡傛灉浠爜鍙?#37828;?#37929;?#28028;硷細鍏?#26473;愮敤Extract Method锛堟?#24878;?#29006;嚱鏁?#38171;?#37714;?#23534;鍐岶orm TemPlate Method锛堝閫?#22959;?#37833;垮嚱鏁?#38171;?</li></ul> <li>涓?#28051;?#23011;?#28051;?#37929;?#39582;茬殑绫?#28699;樺湪閲?#28598;?#28000;爜?#32048;Extract Class锛堟?#24878;偧绫?#38171;?</li></ul> <h3 id="32-p76long-method杩?#38336;垮嚱鏁?>3.2 (P76)Long Method锛?#26473;?#38336;垮嚱鏁?#38171;?/h3> <p>?#24107;鍒欙細灏?#38322;?#37714;敤鍑?#37825;?#37722;?#32457;版潵瑙?#38322;婄敤閫旓紝鑰?#28051;?#37828;敞閲?#37510;?br>鍏抽敭?#32048;浠爜涓?#29781;佺敤鏉?#37819;?#26473;?#37413;?#37707;?#28000;涔?#37413;濓紝鑰?#28051;?#37828;?#37819;?#26473;?#37413;?#37804;?#28052;?#37707;?#37413;?#37510;?#28186;嬪?#20646;細getAge()琛?#26440;捐幏鍙?#39582;撮?#21238;紝鑰宼oday-birthday灏卞?#28850;姞浜嗙悊瑙殑?#26879;?#24116;鎬紝铏界?#21057;湅浠爜?#27537;浜?#28052;?#38003;?#37828;?#37927;?#37722;?#28052;夛紝浣?#37828;?#28751;?#38343;瑕?#28598;氭兂涓涓嬶紝骞朵笖birthday鏈?#37721;?#38003;借杈剧殑涓?#37828;煇涓?#27996;虹殑?#22189;鐢?#37827;?#37832;熷憿?#32029;鑰?#37828;煇涓?#28052;?#37733;?#37833;殑浜搧?#27537;鍛?#38171;?#38317;?#37721;?#38003;借杈剧殑灏?#37828;?#28003;跨敤鏃堕暱浜?#37510;?<br>鍏蜂?#25780;儏鍐碉細</p> <ul> <li>鍑?#37825;?#37832;?#28598;?#38322;?#37721;傛?#26495;拰涓?#37827;?#37721;?#38322;忥細Extract Method锛堟?#24878;?#29006;嚱鏁?#38171;? <li>?#25956;Replace Temp with Query锛?#28000;煡璇?#37721;?#28000;?#28051;?#37827;?#37721;?#38322;?#38171;?#23057;堥櫎涓?#37827;?#37721;?#38322;? <li>?#25956;Introduce Parameter Object锛堝紩鍏?#37721;傛?#26495;?#30789;薄锛?#37812;?#38000;匬reserve Whole Object锛?#28103;濇?#20344;?#30789;薄瀹屾暣锛夋潵灏?#28598;氶?#36328;殑鍙傛暟鍒楄鍙?#23536;楃畝娲?#28051;鐐?#37510;? <li>濡傛灉鎸夌収涓?#26473;版楠?#26473;樺?#27194;湪澶?#28598;?#37721;?#38322;忓拰鍙傛?#26495;氨闇瑕佺敤鍒癛eplace Method with Method Object锛?#28000;?#37713;?#37825;板?#30789;薄鍙?#28000;?#37713;?#37825;?#38171;? <li>鏉?#28000;?#29723;?#26440;惧紡鍙?#28000;敤Decompose Conditional锛?#37714;?#29785;?#37833;?#28000;?#29723;?#26440;惧紡锛?#29785;?#37712;? <li>鍙?#28000;?#28751;?#23536;?#37916;?#37712;呯殑浠爜鎻愮偧涓哄嚱鏁?#37510;?</li></ul> <h3 id="33-p78large-class杩?#28598;殑绫?>3.3 (P78)Large Class锛?#26473;?#28598;殑绫?#38171;?/h3> <p>鏈?#37827;?#37706;?#32491;?#39582;堕?#28850;湪鎵鏈?#37827;?#37714;?#38318;戒?#36328;敤瀹?#28186;?#37721;?#38322;忥細浣跨敤Extract Method鍜孍xtract Subclass锛堟?#24878;?#29006;?#24878;被锛?/p> <p>绫?#28051;?#37832;?#28598;?#28598;?#28000;爜?#32048;</p> <ul> <li>Extract Class锛堟?#24878;偧绫?#38171;? <li>Extract Subclass锛堟?#24878;?#29006;?#24878;被锛? <li>Extract Interface锛堟彁渚涙帴鍙?#38171;?#37714;?#29785;?#32491;荤殑琛?#28051;?#37510;?#28699;樺湪GUI?#27537;鏃?#37706;欙紝鍙?#28000;Duplicate Observed Data锛?#28598;?#37714;?#37413;滆鐩?#29785;?#37825;版嵁鈥?#38171;夛紝鍒嗙鏁版嵁鍜岃涓哄埌涓氬姟妯瀷涓幓銆?</li></ul> <h3 id="34-p78long-parameter-list杩?#38336;垮?#20635;暟鍒?>3.4 (P78)Long Parameter List锛?#26473;?#38336;垮?#20635;暟鍒?#38171;?/h3> <ul> <li>濡傛灉鍙?#28000;?#29835;冪敤宸?#37832;?#28725;硅薄鑾?#37721;栫殑璇?#37721;?#28000;?#28003;跨敤Replace Parameter with Methods锛?#28000;?#37713;?#37825;板彇浠?#37721;傛暟锛? <li>灏嗘潵?#22172;鍚?#28051;瀵硅薄?#27537;鏁版嵁鏀堕?#21978;?#38155;潵?#32029;浠?#29831;?#28725;硅薄鏇?#28000;細Preserve Whole Object锛?#28103;濇?#20344;?#30789;薄瀹屾暣锛? <li>濡傛灉?#22161;涓?#37721;傛?#29256;?#37828;?#37722;?#37827;跺嚭?#24135;?#32029;閭?#28052;?#37721;?#28000;?#38000;冭檻Introduce Parameter Object锛堝紩鍏?#37721;傛?#26495;?#30789;薄锛?</li></ul> <h3 id="35-p79divergent-change鍙?#37825;紡鍙樺寲">3.5 (P79)Divergent Change锛?#37721;?#37825;紡鍙樺寲锛?/h3> <p>涓?#37722;岀殑鍙樺寲褰?#37725;嶇潃鐩?#37722;岀殑绫?#37721;戠?#29112;敼鍙橈紝鍗?#37721;樺寲?#27537;璁煡鏈?#37714;?#23005;?#38171;圖ivergent锛?#37510;?#38315;氳繃Extract Class鎶?#28051;?#37722;岀殑鍔?#38003;藉?#20349;鍒?#28051;?#37722;岀殑绫?#28051;紝浣挎瘡涓?#32491;?#37721;?#37733;?#28051;绉嶅?#27194;寲鑰?#38343;瑕?#28103;?#37824;?/p> <h3 id="36-p80shotgun-surgery闇板?#29808;紡淇?#37824;?>3.6 (P80)Shotgun Surgery锛?#38343;板?#29808;紡淇?#37824;?#38171;?/h3> <p>鐩?#37722;岀殑鍙樺寲浼?#23057;?#37721;婂埌澶?#28051;?#32491;?#37721;戠敓淇?#37824;癸紝绫?#28028;?#38343;板?#35268;灙?#30368;鍑荤殑鏁堟灉銆?br>鍙?#28000;?#38315;氳繃Extract Method?#32029;Move Method?#32029;Inline Class鎶?#28051;绉嶅?#27194;寲浜?#37922;熺殑澶?#28051;?#28103;?#37824;?#32457;?#37714;?#37722;?#28051;涓?#32491;?#28051;?#37510;?/p> <p>瀵规瘮?#32048;</p> <ul> <li>Divergent Change锛?#37721;?#37825;紡鍙樺寲锛?#37828;?#28051;涓?#32491;诲彈鍒扮殑澶?#28051;?#37721;樺寲褰?#37725;?#38171;? <li>Shotgun Surgery锛?#38343;板?#29808;紡淇?#37824;?#38171;?#37828;?#28051;涓?#37721;樺寲?#32041;璧?#28598;?#28051;?#32491;?#38343;瑕?#28103;?#37824;?#37510;?</li></ul> <h3 id="37-p80feature-envy渚?#37805;嬫儏缁?>3.7 (P80)Feature Envy锛?#28186;?#37805;嬫儏缁?#38171;?/h3> <p>绫?#28051;殑?#28999;涓?#37713;?#37825;板鍏朵粬绫荤殑渚濊禆搴?#26473;?#26946;橈紝鍒?#25652;?#29831;?#38315;氳繃Move Method锛?#32457;?#37716;?#37713;?#37825;?#38171;夊皢瀹冩惉绉?#37714;?#37722;?#38315;傜殑绫?#28051;?#37510;?/p> <h3 id="38-p81data-clumps鏁版嵁娉?#37733;?>3.8 (P81)Data Clumps锛堟?#29256;嵁娉?#37733;?#38171;?/h3> <p>鏁版嵁椤?#37804;?#37828;?#37812;愮兢缁?#38339;熷嚭?#24135;?#32029;閫氳繃Extract Class灏?#28729;?#28000;?#37819;愮?#29006;埌涓涓?#37913;?#32468;?#28725;硅薄涓紝浠?#38000;岀缉鐭?#37721;傛暟鍒楄?#32029;?#30045;?#23538;鍑?#37825;拌?#20906;敤銆?/p> <p>鍒?#37826;?#37825;版嵁椤?#37828;?#37722;?#37929;?#37711;崇殑鏂规硶?#32048;濡傛灉杩?#27996;?#37825;版嵁椤?#28051;嶅湪涓璧?#37827;?#28751;?#28598;卞幓浜?#37828;庣?#27537;鍚?#28052;夛紝閭?#28052;?#28751;?#37721;?#28000;?#37814;婂畠浠?#37819;愮偧鎴?#28051;涓柊?#27537;瀵硅薄銆?/p> <h3 id="39-p81primitive-obsession鍩?#37832;?#32491;诲瀷鍋?#37813;?>3.9 (P81)Primitive Obsession锛堝熀鏈?#32491;诲瀷鍋?#37813;?#38171;?/h3> <ul> <li>鏈?#27996;涘?#26945;鍙?#28000;敤瀵硅薄琛?#32448;?#37831;村?#21977;Replace Data Value with Object锛?#28000;?#28725;硅薄鍙?#28000;?#37825;版嵁鍊?#38171;? <li>瀵?#27996;?#28051;嶅奖鍝?#29723;?#28051;虹殑绫诲?#23340;爜鍙?#28000;Replace Type Code with Class锛?#28000;?#32491;?#37721;?#28000;?#32491;诲?#23340;爜锛? <li>褰?#37725;?#29723;?#28051;虹殑绫诲?#23340;爜鍙?#28000;Replace Type Code with Subclasses锛?#28000;?#28699;愮被鍙?#28000;?#32491;诲?#23340;爜锛夛紝绫诲?#23340;爜?#28266;杩?#29723;?#37827;朵細鍙樺寲灏辩敤Replace Type Code with State/Strategy锛?#28000;State/Strategy鍙?#28000;?#32491;诲?#23340;爜锛?</li></ul> <h3 id="310-p82switch-statementsswitch鎯婃?#27697;幇?#38889;">3.10 (P82)Switch Statements锛坰witch鎯婃?#27697;幇?#38889;锛?/h3> <ul> <li>浣跨敤Replace Type Code with Subclasses锛?#28000;?#28699;愮被鍙?#28000;?#32491;诲?#23340;爜锛?#37812;?#38000;匯eplace Type Code with State/Strategy锛?#28000;State/Strategy鍙?#28000;?#32491;诲?#23340;爜锛? <li>杞?#38322;忕骇?#27537;瑙?#37712;虫?#35268;硶?#32048;Replace Parameter with Explicit Methods锛?#28000;?#37828;庣鍑?#37825;板彇浠?#37721;傛暟锛?</li></ul> <h3 id="311-p83parallel-inheritance-hierarchies骞宠缁?#37813;夸綋绯?>3.11 (P83)Parallel Inheritance Hierarchies锛?#39582;宠缁?#37813;夸綋绯?#38171;?/h3> <p>姣忓綋涓?#28051;涓?#32491;诲?#28850;?#29362;?#24878;被蹇?#26916;?#28052;?#28051;哄彟澶?#28051;涓?#32491;诲?#28850;姞涓涓?#28699;愮?#20249;紝閭?#28052;?#28751;?#29825;?#28051;涓?#32513;?#37813;夸綋绯荤殑瀹?#28186;嬪紩?#25956;鍙?#28051;涓?#32513;?#37813;夸綋绯荤殑瀹?#28186;?#37510;?/p> <h3 id="312-p83lazy-class鍐楄禈绫?>3.12 (P83)Lazy Class锛?#37712;楄禈绫?#38171;?/h3> <p>娌敤?#27537;绫伙紝浣跨敤Inline Class锛?#37712;?#38001;旂被锛?#37812;?#38000;匔ollapse Hierarchy锛?#37814;?#37721;犵户鎵夸綋绯?#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;殑绫伙紝浣跨敤Inline Class锛?#37712;?#38001;旂被锛?#37812;?#38000;匔ollapse Hierarchy锛?#37814;?#37721;犵户鎵夸綋绯?#38171;夋潵瑙?#37712;? <li>涓?#37832;?#37833;?#29825;?#29825;殑鍑?#37825;板?#20635;暟?#32029;浣跨敤Remove Parameter锛?#32457;婚櫎鍙傛暟锛? <li>鍑?#37825;?#37722;?#32457;板?#26495;棪?#32029;浣跨敤Rename Method锛堝嚱鏁版敼鍚?#38171;?</li></ul> <h3 id="314-p84temporary-field浠?#27996;?#26473;锋?#25120;殑?#27535;鏃?#28699;楁">3.14 (P84)Temporary Field锛?#28000;?#27996;?#26473;锋?#25120;殑?#27535;鏃?#28699;楁锛?/h3> <p>瀵硅薄涓煇涓?#28699;楁浠?#28051;虹壒瀹氭儏鍐?#38000;?#29825;?#37510;?#28003;跨敤Extract Class锛堟?#24878;偧绫?#38171;夊皢杩?#28051;?#28699;楁?#22443;彁鍙栧嚭鏉?/p> <h3 id="315-p84message-chains杩?#25652;?#38000;?#37722;堢殑娑堟伅閾?>3.15 (P84)Message Chains锛?#26473;?#25652;?#38000;?#37722;堢殑娑堟伅閾?#38171;?/h3> <p>娑堟伅閾撅細?#25956;鎴?#38315;氳繃涓涓?#28725;硅薄鑾?#37721;?#37721;?#28051;涓?#28725;硅薄?#32029;鍐?#38315;氳繃鑾?#37721;栫殑瀵硅薄璇锋眰鍙?#28051;涓?#28725;硅薄?#32029;濡傛鎿?#28003;?#28751;?#37828;?#23057;堟伅閾?#37510;傞噰鍙?#26473;?#32457;?#37826;瑰紡鎰忓?#23815;潃瀹?#37812;?#28000;爜灏?#28051;庢煡鎵?#26473;囩涓殑瀵艰埅缁撴?#21229;瀵?#38000;?#37722;堬紝鍙?#28000;?#28003;跨敤Hide Delegate锛堥殣钘?#37413;?#28654;?#37813;?#37711;?#32495;?#37413;?#38171;?#26473;?#29723;?#38322;?#37835;勩?#28003;?#37828;?#29835;?#37809;庡?#21229;悊锛?/p> <h3 id="316-p85middle-man涓棿浜?>3.16 (P85)Middle Man锛?#28051;棿浜?#38171;?/h3> <p>杩?#25652;?#28654;?#37813;樺Ş鎴?#28051;棿浜?Remove Middle Man锛?#32457;婚櫎涓棿浜?#38171;?/p> <p>濡傛灉涓棿浜?#26473;?#37832;?#37711;朵粬琛?#28051;?Replace Delegation with Inherited锛?#28000;?#32513;?#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;濊禆杩?#28598;氾紝鑺?#29840;?#28598;?#38322;?#37827;堕棿?#24147;鑾?#37721;?#28725;?#37826;圭殑private鎴愬憳鍐?#28729;癸紝浣跨敤Move Field锛?#32457;?#37716;?#28699;楁锛夊拰Move Method锛?#32457;?#37716;?#37826;规硶锛夊?#24531;皯鑰?#37722;堟紝鎴栫敤Change Bidirectional Association to Unidirectional锛?#28751;?#37721;?#37722;?#37711;?#38001;?#37824;?#28051;哄崟鍚?#37711;?#38001;?#38171;? <li>濡傛灉涓?#28051;?#32491;?#37827;?#23049;曠鍔?#37929;?#37722;屾?#29256;嵁鍜屽嚱鏁帮紝鍙?#28000;?#28003;跨敤Extract Class锛堟?#24878;偧绫?#38171;?璁粬浠?#28003;跨敤?#26570;绫?#26473;?#29723;?#27996;?#27996;?#37510;?</li></ul> <h3 id="318-p85alternative-classes-with-different-interfaces寮傛洸鍚屽伐?#27537;绫?>3.18 (P85)Alternative Classes with Different Interfaces锛?#23534;傛洸鍚屽伐?#27537;绫?#38171;?/h3> <p>涓?#28051;?#37713;?#37825;板仛浜?#37929;?#37722;岀殑浜嬫儏鍗?#37832;?#28051;?#37722;岀殑鍑?#37825;?#37722;?#32457;?/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;板姛鑳?#28051;嶈?#31609;紝闇瑕佸?#28850;姞涓浜涜嚜瀹?#28052;夌殑鍔?#38003;斤細</p> <ul> <li>闇瑕佸姞鍏?#28751;?#38322;?#37823;?#28003;滐紝浣跨敤Introduce Foreign Method锛堝紩鍏?#28598;?#37716;犲嚱鏁?#38171;? <li>闇瑕佸姞鍏?#28598;?#38322;?#37823;?#28003;滐紝浣跨敤Introduce Local Extension锛堝紩鍏?#37832;?#37734;?#37813;?#28766;?#38171;?</li></ul> <h3 id="320-p86data-class骞?#32459;氱殑鏁版嵁绫?>3.20 (P86)Data Class锛?#39582;?#32459;氱殑鏁版嵁绫?#38171;?/h3> <p>骞?#32459;氱殑鏁版嵁绫伙細鍙?#37832;?#37825;版嵁娌?#37832;夎涓虹殑绫伙紝鍏朵粬绫?#38343;瑕佸璇?#32491;荤殑鏁版嵁杩?#29723;?#37721;?#37706;?#29825;惧?#37823;?#28003;?/p> <ul> <li>浣跨敤Encapsulate Field锛?#28751;佽?#21613;?#26945;锛夊拰Encapsulate Collection锛?#28751;佽?#21620;泦鍚?#38171;?#28725;?#28699;楁杩?#29723;?#37722;堢悊鍦板?#20349; <li>瀵?#27996;?#28051;?#29831;?#29722;?#37711;朵粬绫?#28103;?#37824;圭殑瀛楁:Remove Setting Method锛?#32457;婚櫎璁惧煎嚱鏁?#38171;?</li></ul> <h3 id="321-p87refused-bequest琚?#37815;?#32513;濈殑閬楄禒">3.21 (P87)Refused Bequest锛堣鎷?#32513;濈殑閬楄禒锛?/h3> <p>濡傛灉瀛愮被涓?#37808;?#37808;忔帴?#24392;瓒?#32491;荤殑鎵鏈?#28729;?#28052;夛紝搴?#29831;?#28003;跨敤Replace inherited with Delegation锛?#28000;?#28654;?#37813;?#37721;?#28000;?#32513;?#37813;?#38171;夋潵澶勭悊瀛愮被</p> <h3 id="322-comments杩?#28598;氱殑?#25950;閲?7">3.22 Comments锛?#26473;?#28598;氱殑?#25950;閲?#38171;?7</h3> <p>浣跨敤Extract Method锛堟?#24878;偧鏂规硶锛夋潵瑙?#37712;虫敞閲?#26473;?#28598;?#38338;?#26864;橈紝?#25950;閲?#37831;?#28598;?#25652;?#29831;?#29831;?#37828;庣殑鏄?#37413;?#37804;?#28052;?#37707;?#37413;濓紝鑰?#28051;?#37828;?#37413;?#37707;?#28000;涔?#37413;濓紝渚嬪?#20646;細瀵?#28051;涓帓搴忓嚱鏁?#29831;?#37828;?#37711;堕?#22249;敤浜?#37714;嗘硶?#24083;搴忥紝鑰?#28051;?#37828;?#29831;?#37828;?#28729;?#37828;?#28051;帓搴忓嚱鏁帮紝鍥?#28051;?#26473;?#28051;?#29831;?#37828;庡湪鍑?#37825;?#37722;?#32457;?#28051;?#23480;?#32513;?#37711;?#28598;?#37510;?/p> <h2 id="绗?绔?鏋勭?#25118;祴璇曚綋绯?>绗?绔?鏋勭?#25118;祴璇曚綋绯?/h2> <h3 id="41-?#22172;?#31092;璇?#28000;爜?#27537;浠?#37706;?9">4.1 ?#22172;?#31092;璇?#28000;爜?#27537;浠?#37706;?9</h3> <ul> <li>纭?#28103;?#37813;鏈夋祴璇?#38318;?#28729;?#37711;嚜鍔寲?#32029;璁?#28729;?#28000;?#22955;?#29025;?#22172;宸辩殑?#31092;璇曠?#25780;灉锛? <li>涓濂楁祴璇?#28751;?#37828;?#28051;涓?#23534;哄?#27537;bug鎺?#23092;嬪櫒?#32029;鑳?#28598;?#28598;?#28598;?#32514;?#37713;忔煡鎵bug鎵闇瑕佽姳璐圭殑鏃堕棿銆? <ul> <li>鍥?#28051;?#28000;爜鍒?#37714;?#37712;?#28729;岋紝?#31092;璇曞嚭?#24135;闂?#26864;?#37722;庯紝蹇?#38322;屽?#22559;竻妤氳嚜宸?#28103;?#37824;?#37812;?#38000;?#23075;?#37716;?#27996;?#37725;?#27996;?#28051;滆?#21281;紝鍙?#38003;?#28028;氬湪鍝?#38322;屽嚭?#24135;浜?#38338;?#26864;?#37510;? <h3 id="42-junit?#31092;璇曟?#21976;灦91">4.2 JUnit?#31092;璇曟?#21976;灦91</h3></li></ul> <li>棰戠?#20344;湴杩?#29723;屾祴璇?#38171;? <li>?#30241;娆?#32514;?#29831;戝墠閮?#26473;?#29723;?#28051;娆祴璇?#38171;? <li>?#30241;澶?#38007;?#28751;?#37813;?#29723;?#28051;娆?#37813;鏈夌殑?#31092;璇?#37510;? <h3 id="43-娣?#37716;?#37831;?#28598;氭祴璇?7">4.3 娣?#37716;?#37831;?#28598;氭祴璇?7</h3> <li>缂?#37712;?#28051;涓祴璇?#39582;?#26473;?#29723;岃?#38155;潵?#32029;濂?#26473;囧皢鎵鏈夌殑?#31092;璇曠紪濂?#27996;?#28051;璧?#26473;?#29723;?#37510;? <li>?#31092;璇曠壒鍒?#38343;瑕佹敞鎰?#37721;?#38003;藉嚭?#25930;?#27537;杈圭?#23678;潯浠?#38171;? <li>瀵?#27996;庡彲鑳藉嚭?#25930;?#27537;鍦版柟?#32029;杩?#38343;瑕佹?#29025;鏄?#37722;?#37814;涘嚭浜?#26864;?#37832;熺殑寮傚父锛? <li>?#31092;璇?#28051;?#38003;?#29785;?#37712;虫墍鏈塨ug?#32029;浣?#37828;?#37721;?#28000;?#28598;?#28598;?#37713;忓皯bug?#27537;鏁?#38322;?#37510;?</li></ul> <h2 id="绗?2绔?澶瀷閲?#37835;?59">绗?2绔?澶瀷閲?#37835;?59</h2> <p>澶瀷閲?#37835;?#37828;?#32459;?#25652;?#23534;鍙戝?#21613;皢閬?#37714;扮殑?#32029;鍙?#37828;?#28051;嶇煡閬撳湪浠涔?#37827;堕棿?#32029;?#25956;浠涔?#37837;风殑鏂瑰紡缁忓巻銆?#28186;嬪?#20646;細?#27554;鐫鏃堕棿?#27537;鎺?#32457;伙紝娌?#38316;?#36423;?#28729;?#28028;氳姘磋?#22794;?#23677;瀮鍦炬墍鍫靛?#28871;紝浣?#37721;?#28000;?#37733;?#28729;?#37827;堕棿?#31483;娣紝涔熷彲浠?#37824;?#28000;昏嚜娴?#37929;?#37714;板穿婧?#37510;傚穿婧?#37722;?#28186;?#37906;朵細?#28528;涓存?#32513;?#32513;?#26976;屾暀璁紝鍐嶆閲?#37835;勭?#33636;粺銆?<br>澶瀷閲?#37835;勫緢闅剧粰?#22189;鍏蜂綋?#27537;鎿?#28003;?#22935;?#28186;嬶紝鍥?#28051;烘瘡涓?#28598;?#37736;嬫渚?#37929;?#28725;?#27996;庤嚜?#38889;鏉?#29831;?#38318;?#37828;?#37807;?#28051;?#27537;?#32029;鏄?#37827;犳硶澶?#37714;?#37724;?#38322;嶇幇?#27537;銆?#37721;?#28000;?#28598;?#37714;朵笌閲嶇幇?#27537;閮?#37828;?#26473;?#27996;涘?#28727;閲?#37835;?#28051;暣鍚殑鍏蜂綋?#27537;缁?#38010;傦紝鍥?#23005;?#26473;?#32468;?#28051;?#29781;佽?#33580;殑鏄?#37804;濇兂鍜岀悊?#24247;涓婄殑鍐?#28729;?#37510;?<br>鍥?#28051;?#28598;瀷閲?#37835;勶細</p> <ul> <li>Tease Apart Inheritance锛?62锛夌敤浜庡?#21229;悊娣蜂?#36777;殑缁?#37813;夸綋绯? <ul> <li>?#28999;涓?#32513;?#37813;夸綋绯?#37722;?#37827;?#37813;?#37815;?#28051;?#26916;硅矗浠? <li>?#32531;绔?#28051;?#28051;?#32513;?#37813;夸綋绯伙紝鍏朵腑涓涓?#38315;氳?#22247;鎵樿?#20906;敤鍙?#28051;涓?</li></ul> <li>Convert Procedural Design to Objects锛?68锛夊浣?#38322;?#37835;?#26473;?#37827;剁殑缂栫爜鎶鏈?#38316;楃暀涓嬫潵?#27537;绋?#25652;? <ul> <li>浼犵粺杩囩?#23338;寲椋?#37837;肩殑浠爜 <li>灏?#37825;版嵁璁板綍鍙?#37812;?#28725;硅薄?#32029;灏?#28598;?#37735;楃殑琛?#28051;哄垎鎴?#28751;忓潡?#32029;鍐嶅皢瀹?#28000;?#32457;?#37711;?#37714;?#37929;?#37711;?#28725;硅薄涓?</li></ul> <li>Separate Domain from Presentation锛?70锛夊皢涓氬姟閫昏緫涓庣敤鎴风?#23684;潰鍒嗛殧寮鏉? <ul> <li>?#25956;鎴风?#23684;潰绫?#28051;?#37718;?#37722;?#27996;?#28051;氬姟閫昏緫 <li>灏?#28051;氬姟閫昏?#25117;绂?#37714;?#28051;氬姟绫?#28051;紝鍙?#38000;冿細MVC妯紡 </li></ul> <li>Extract Hierarchy锛?75锛夊皢澶嶆潅?#27537;绫?#26462;寲涓?#28051;缇畝鍗曠殑瀛愮?#20249;紝浠?#38000;岀畝?#23538;绯荤粺銆? <ul> <li>?#28999;涓?#32491;?#37707;?#27996;?#28598;?#28598;?#23480;?#28003;? <li>?#28999;涓?#32491;荤殑閮?#37714;?#23480;?#28003;?#37828;?#37922;?#28598;?#38322;忕殑鏉?#28000;?#29723;?#26440;惧紡瀹?#37812;愮殑 <li>?#32531;绔?#32513;?#37813;夸綋绯伙紝浣跨敤瀛愮被琛?#32448;烘瘡涓绉嶇?#35268;?#23107;儏鍐?</li></ul></li></ul> <h2 id="绗?3绔?閲?#37835;?#28598;嶇敤涓庣幇瀹?79">绗?3绔?閲?#37835;勶紝澶嶇敤涓庣幇瀹?79</h2> <p>浣?#28051;?#28051;涓?#37719;氬鍐欑殑鍐?#28729;癸紝浠?#37906;?#37711;?#37832;夊鏈?#37804;緝寮虹殑椋?#37837;硷紝鍙?#28000;綋浣滃巻鍙?#29863;?#37826;?#27996;?#29785;?#28051;涓?#38322;?#37835;勭殑鍙戝睍杩囩?#23350;紝涔熷彲浠?#28725;?#38322;?#37835;勭殑鎬濇兂鏈?#37831;?#28598;氱悊璁?#28051;婄殑璁?#29831;?#37510;?/p> <h3 id="瀹?#37711;?#38322;?#37835;?91">瀹?#37711;?#38322;?#37835;?#38171;?91锛?/h3> <p>瀹?#37711;?#38322;?#37835;勭殑鍥涙潯绡辩?#21997;細</p> <ul> <li>鐩?#28103;?#28003;犺嚜宸辩殑缂栫爜鑳藉姏锛? <li>鐩?#28103;?#28003;犵殑缂?#29831;戝櫒鑳?#37817;?#37817;?#28003;?#38316;楁紡?#27537;?#25930;璇?#38171;? <li>鐩?#28103;?#28003;犵殑?#31092;璇?#28610;?#28000;?#38003;?#37817;?#37817;?#28003;犲拰缂?#29831;戝櫒閮?#38316;楁紡?#27537;?#25930;璇?#38171;? <li>鐩?#28103;?#28000;爜澶?#28729;?#38003;?#37817;?#37817;?#28003;?#37510;?#32514;?#29831;戝櫒鍜屾祴璇?#28610;?#28000;堕兘閬楁紡?#27537;?#25930;璇?#37510;傛敞?#32048;娌?#37832;?00%瀹?#37711;殑閲?#37835;勶紝浣?#37828;?#37721;?#28000;?#38315;氳繃浠?#28051;婄殑鏉?#28000;舵弧瓒?#28003;?#28725;?#28729;?#37711;?#37804;殑鏈浣?#29781;?#23033;?#37510;?</li></ul> <h3 id="閲?#37835;勫伐鍏?>閲?#37835;勫伐鍏?/h3> <ul> <li>Eclipse锛堟垨鍏朵粬IDE锛夎嚜甯殑閲?#37835;勫伐鍏凤細Refactor锛? <li>Java锛堟垨鍏朵粬缂?#29831;戝櫒锛夎嚜甯殑鍒嗘瀽宸?#37711;凤細lint锛? <li>JUnit绛夎嚜鍔寲?#27537;?#31092;璇?#23480;?#37711;?#37510;?</li></ul> <h2 id="绗?4绔?閲?#37835;勫伐鍏?01">绗?4绔?閲?#37835;勫伐鍏?01</h2> <p>鐩?#28725;?#27996;?0澶?#39582;村墠鍐欑殑鍐?#28729;癸紝?#24135;?#28266;璁?#28598;欼DE閮藉凡缁忔彁渚?#27996;?#28725;?#28598;?#38318;?#37714;?#38322;?#37835;勫姛鑳界殑鏀?#37816;?#37510;?#28003;?#37828;?#27996;?#29785;?#38322;?#37835;勭殑鍩?#37832;悊?#24247;?#32029;瀵?#27996;庢纭?#37734;?#28003;跨敤閲?#37835;勫伐鍏蜂細鏈夊緢澶殑甯?#37716;?#37510;?#37733;?#28051;?#37812;?#37716;熺殑閲?#37835;?#28051;?#28186;濊禆浜庡伐鍏凤紝鑰?#37712;?#28729;?#27996;?#27996;猴紝?#32139;浜哄仛?#22189;浜?#23005;?#32429;殑鍐?#28729;氾紝鍚堢悊鍦?#28003;跨敤閲?#37835;勫伐鍏?#26440;呭姪?#22172;宸紝鎵?#38003;?#28103;?#29831;?#38322;?#37835;勭殑瀹?#37812;?#37510;?/p> </li><img src ="http://www.5432034.com/zhuyuanxiang/aggbug/433604.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-16 17:48 <a href="http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433604.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>銆?#38322;?#37835;勩嬬殑璇?#28052;?#38322;?#37904;?/title><link>http://www.5432034.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.5432034.com/zhuyuanxiang/archive/2019/01/16/433603.html</guid><wfw:comment>http://www.5432034.com/zhuyuanxiang/comments/433603.html</wfw:comment><comments>http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433603.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/zhuyuanxiang/comments/commentRss/433603.html</wfw:commentRss><trackback:ping>http://www.5432034.com/zhuyuanxiang/services/trackbacks/433603.html</trackback:ping><description><![CDATA[<h2 id="閲?#37835;勭殑?#24107;鍥?>閲?#37835;勭殑?#24107;鍥狅細</h2> <ul> <li>鏀瑰杽杞?#28000;剁殑璁?#29825;?#23000;?#39582;?#38171;? <li>浣?#26462;?#28000;?#37831;村姞瀹?#37828;?#29722;悊瑙?#38171;? <li>浣?#26462;?#28000;?#37831;村姞瀹?#37828;?#28725;?#37813;鹃敊璇?#38171;? <li>浣?#26462;?#28000;?#23534;鍙?#38315;?#25652;?#37831;村揩锛? <li>浣?#26462;?#28000;朵唬?#29212;鏇?#28610;?#32513;?#37814;?#37510;?</li></ul> <h2 id="閲?#37835;勭殑鏃堕棿">閲?#37835;勭殑鏃堕棿?#32048;</h2> <ul> <li>澧炲?#29362;嚱鏁扮殑鏃?#37706;?#38322;?#37835;?#38171;? <li>淇?#37824;归敊璇殑鏃?#37706;?#38322;?#37835;?#38171;? <li>浠爜瀹煡?#27537;鏃?#37706;?#38322;?#37835;勩?</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;嗚嚜鍔寲?#27537;浠爜閲?#37835;勫伐鍏?#38171;? <li>JUnit?#24385;渚?#27996;嗚嚜鍔寲?#27537;?#31092;璇曟?#21976;灦锛? <li>璁?#29825;?#22959;紡?#24385;渚?#27996;?#38322;?#37835;勭殑鏂?#37722;?#38171;? <li>鏋侀?#24878;紪绋嬫彁渚?#27996;?#28729;屾?#23544;殑寮鍙?#26473;囩?#23350;紝鍖?#37815;細缁?#38339;熺紪绋?#37510;佽嚜鍔寲?#31092;璇?#37510;?#28000;爜瀹煡銆佸強鏃?#37721;嶉銆?#28000;爜閲?#37835;勭?#22796;瓑銆?</li></ul><img src ="http://www.5432034.com/zhuyuanxiang/aggbug/433603.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/zhuyuanxiang/" target="_blank">鏈?#26473;?#32520;?/a> 2019-01-16 17:46 <a href="http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433603.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>銆?#38322;?#37835;勩嬬殑璇?#37722;庢劅http://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433602.html鏈?#26473;?#32520;?/dc:creator>鏈?#26473;?#32520;?/author>Wed, 16 Jan 2019 09:43:00 GMThttp://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433602.htmlhttp://www.5432034.com/zhuyuanxiang/comments/433602.htmlhttp://www.5432034.com/zhuyuanxiang/archive/2019/01/16/433602.html#Feedback0http://www.5432034.com/zhuyuanxiang/comments/commentRss/433602.htmlhttp://www.5432034.com/zhuyuanxiang/services/trackbacks/433602.html閲?#37835;?#37828;?#37832;?#28610;?#28052;?/h2>

      浣?#38000;?#28028;?#32457;?#32029;浣?#37725;佷紭绉?#32029;缈?#29831;?#28052;熷緢浼?#32457;銆?#28003;?#37828;紝鏃?#29825;哄涔?#28610;界殑缈?#29831;?#28052;?#37827;犳硶瀹屾暣浼?#26440;?#28003;?#38000;呯殑?#24107;鎰?#37510;?#37733;?#23005;紝璇?#28052;嬪墠鏈濂藉噯澶?#38011;辨枃鍜?#28051;枃涓?#28051;?#37911;?#37832;紝涓枃璇?#28051;嶆?#20636;殑鍦版柟灏?#37817;?#38011;辨枃?#32029;鑻辨枃璇荤殑绱殑鍦版柟灏?#37817;?#28051;枃銆?#37711;?#37714;?#37714;敤?#22172;宸卞湪涓?#32457;?#29831;?#29815;涓婄煡璇嗗偍澶囷紝鍙?#28000;?#28003;?#29831;?#26473;?#37832;?#28052;?#27996;?#37922;?#27996;?#37719;婂?#29111;嶇殑鏁堟灉銆?/p>

      閲?#37835;?#37828;?#37922;?#38343;姹傞鍔殑

      涓?#28000;涔?#29781;?#38322;?#37835;?#38171;?#28051;?#28000;?#28000;?#37828;?#28051;?#27996;?#37812;?#37733;綋?#27537;鍠?#28610;?#38171;堟劅鎬?#26937;?#37716;?#38171;夛紝杩?#25652;?#29831;?#37828;?#37922;?#28729;?#37812;风殑闇姹?#37721;?#37831;?#28725;?#38007;撮鐩?#26473;?#28000;嚭?#24135;鍥伴毦?#32029;鑰?#38322;?#37835;?#23005;?#37828;?#29785;?#37712;?#37733;伴?#21095;殑濂藉?#28852;硶,浜?#37828;?#37818;?#37716;?#38322;?#37835;?#38171;堢悊鎬?#26937;?#37716;?#38171;?#37510;?/p>

      ?#32139;鐒讹紝浣?#28051;?#38322;?#37835;?#37714;?#37714;?#37711;?#38338;殑绋?#25652;忓憳涓瀹?#28028;?#37714;?#28598;?#28003;跨敤杩?#28051;?#28598;?#37833;鍣紝浣?#37828;殢鐫鎶鏈?#37724;?#32513;?#26976;岀殑鎴愮啛?#32029;搴?#29831;?#29863;?#37722;?#26916;哄簲闇姹傜殑閲?#37835;勶紝?#24359;瓒?#28729;?#37812;?#38343;姹?#37813;?#37828;?#26916;?#37929;殑鏍?#37832;?#37510;?/p>

      閲?#37835;?#29781;?#37814;婂鐩?#37837;?#37714;?#29785;?#37812;?#29825;?#28598;?#28051;皬鐩?#37837;?/h2>
      • 鍥?#28051;烘瘡涓皬鐩?#37837;?#37813;?#28051;?#28028;氳?#21613;嚭?#22172;宸辩殑鎺?#37714;?#38003;藉?#28083;紝?#22189;?#24135;?#25930;璇?#37722;?#28052;?#37831;?#28729;?#37828;?#37733;?#38315;銆?
      • 閲?#37835;勭殑?#30241;涓皬鐩?#37837;?#37832;濂借兘澶?#37711;?#28598;?#37832;?#37825;?#37734;版?#31092;鏈哄埗
      • 閲?#37835;勭殑澶?#37929;?#37837;囧繀椤绘彁渚涙楠?#37832;哄埗

      閲?#37835;?#37832;濂借?#25106;?#36328;敤GIT銆丣Unit绛夌瓑濂界殑閲?#37835;勫伐鍏?#26440;呭姪

      鐔熸倝閲?#37835;勭殑?#24714;璁虹煡璇嗭紝鍠勭敤閲?#37835;勭殑宸?#37711;?#37510;?#28725;?#27996;庡伐鍏风殑?#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/">銆婂伐鍏风殑鎰?#28052;?#37510;?/a>



      ]]>
      Windows7涓媍hm?#26499;浠?#37813;?#28051;嶅紑http://www.5432034.com/zhuyuanxiang/archive/2019/01/15/433599.html鏈?#26473;?#32520;?/dc:creator>鏈?#26473;?#32520;?/author>Tue, 15 Jan 2019 04:05:00 GMThttp://www.5432034.com/zhuyuanxiang/archive/2019/01/15/433599.htmlhttp://www.5432034.com/zhuyuanxiang/comments/433599.htmlhttp://www.5432034.com/zhuyuanxiang/archive/2019/01/15/433599.html#Feedback0http://www.5432034.com/zhuyuanxiang/comments/commentRss/433599.htmlhttp://www.5432034.com/zhuyuanxiang/services/trackbacks/433599.html浠庣綉涓?#28051;?#26462;界殑CHM?#26499;浠跺湪Windows7绯荤粺涓?#37827;犳硶鏄剧?#21700;唴瀹癸紝鏄?#37733;?#28051;篧indows7绯荤粺涓殑娴?#29785;堝櫒涓?#26462;界殑?#26499;浠?#37828;?#29722;?#27035;樿涓洪攣瀹氱殑?#32029;鎵浠?#37813;?#23534;浠?#37722;?#37828;?#37827;犳硶鏄剧閲岄潰?#27537;鍏蜂綋鍐?#28729;圭殑?#32029;瑙?#37712;崇殑鍔炴硶?#32048;

      • 閫?#28051;?#26473;?#28051;CHM?#26499;浠?#38171;?
      • 鐐?#37721;抽敭?#32029;閫?#37815;?#37413;?#28766;?#37804;?#37413;濓紝?#28266;鈥滃父瑙?#37413;?#37837;囩鏍忕殑鏈涓嬮潰?#32029;鏈?#28051;?#37413;?#29785;櫎閿?#28729;?#37413;濈殑鎸夐挳?#32029;鐐瑰嚮浠?#37722;?
      • 鍐?#23005;父鎵?#23534;chm?#26499;浠?#28751;?#37721;?#28000;?#23092;?#29785;?#37714;?#38322;岄潰?#27537;鍐?#28729;?#27996;?#37510;?/li>


      ]]>
      鐖?#28610;囪壓鎶鏈?#37714;?#27996;細鐖?#28610;囪?#31688;ndroid瀹?#37812;风鍚?#37716;?#38315;?#25652;?#28028;樺寲瀹?#29882;?#37804;?#32513;?/title><link>http://www.5432034.com/jb2011/archive/2019/01/14/433598.html</link><dc:creator>Jack Jiang</dc:creator><author>Jack Jiang</author><pubDate>Mon, 14 Jan 2019 03:53:00 GMT</pubDate><guid>http://www.5432034.com/jb2011/archive/2019/01/14/433598.html</guid><wfw:comment>http://www.5432034.com/jb2011/comments/433598.html</wfw:comment><comments>http://www.5432034.com/jb2011/archive/2019/01/14/433598.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/jb2011/comments/commentRss/433598.html</wfw:commentRss><trackback:ping>http://www.5432034.com/jb2011/services/trackbacks/433598.html</trackback:ping><description><![CDATA[     鎽樿: 鏈枃鐢辩埍濂囪壓鎶鏈?#37733;?#38339;熷師鍒?#37714;?#27996;紝?#24107;棰?#37510;婄埍濂囪?#31688;ndroid瀹?#37812;风鍚?#37716;?#28028;樺寲涓?#37714;嗘瀽銆?#37510;?銆佸紩瑷浜?#38001;旂綉棰嗗煙閲?#37832;?#28051;?#37711;?#32457;?#28729;?#23536;嬶紝濡傛?#28357;綉椤?#37813;?#23534;鏃堕棿瓒?#26473;?绉掞紝?#31350;浼?#37832;夎秴杩?0%?#27537;?#25956;鎴锋?#24807;純绛夊?#21635;紝瀵笰ndroid APP鑰?#29815;?#32029;瑕?#23033;傛?#26449;姞涓?#37837;硷紝濡傛灉绯荤粺鏃犲搷搴?#37827;堕棿瓒?#26473;?绉掞紝?#31350;浼氬嚭?#24135;ANR?#32029;APP鍙?#38003;?#28028;氳寮哄埗鍏?#38338;紝鍥?#23005;紝鍚?#37716;?#37827;堕棿浣?#28051;?#28051;涓?#38322;?#29781;佺殑鎬?#38003;芥寚鏍囷紝鍏?#32495;荤潃?#25956;鎴风殑绗?#28051;?#32139;楠?#37510;傜埍濂囪壓瀹?#37719;APP闈炲父閲?#29785;?#37722;?#37716;?#38315;?#25652;殑浼樺寲?#32029;鏈枃灏?#28000;?#37722;?#37716;?#26473;囩...  <a href='http://www.5432034.com/jb2011/archive/2019/01/14/433598.html'>闃?#29831;?#37711;枃</a><img src ="http://www.5432034.com/jb2011/aggbug/433598.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/jb2011/" target="_blank">Jack Jiang</a> 2019-01-14 11:53 <a href="http://www.5432034.com/jb2011/archive/2019/01/14/433598.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>Android绋?#25652;忓?#27194;?#21615;煡蹇?#28028;氱殑?#32137;缁?#38315;?#28103;?#28028;犺緭?#30512;鍗?#29825;?#37413;?#37413;擴DP鍜孴CPhttp://www.5432034.com/jb2011/archive/2019/01/10/433591.htmlJack JiangJack JiangThu, 10 Jan 2019 03:15:00 GMThttp://www.5432034.com/jb2011/archive/2019/01/10/433591.htmlhttp://www.5432034.com/jb2011/comments/433591.htmlhttp://www.5432034.com/jb2011/archive/2019/01/10/433591.html#Feedback0http://www.5432034.com/jb2011/comments/commentRss/433591.htmlhttp://www.5432034.com/jb2011/services/trackbacks/433591.html闃?#29831;?#37711;枃

      Jack Jiang 2019-01-10 11:15 鍙戣璇勮
      ]]>
      鍏潰瑙?#28725;QQ绾?#37718;?#37814;鏈?#37826;规?#22572;細鏋舵?#21225;?#37814;鏈?#28729;炵幇銆?#32457;?#37716;?#32468;?#28028;樺寲銆?#37714;涙柊鐜?#23049;曠瓑http://www.5432034.com/jb2011/archive/2019/01/07/433586.htmlJack JiangJack JiangMon, 07 Jan 2019 04:10:00 GMThttp://www.5432034.com/jb2011/archive/2019/01/07/433586.htmlhttp://www.5432034.com/jb2011/comments/433586.htmlhttp://www.5432034.com/jb2011/archive/2019/01/07/433586.html#Feedback0http://www.5432034.com/jb2011/comments/commentRss/433586.htmlhttp://www.5432034.com/jb2011/services/trackbacks/433586.html闃?#29831;?#37711;枃

      Jack Jiang 2019-01-07 12:10 鍙戣璇勮
      ]]>
      缇?#37733;続pp?#27537;绉?#37716;?#32468;DNS浼樺寲瀹?#29882;碉細HTTPS璇锋眰鑰?#37827;?#37713;忓皬杩?#37719;?/title><link>http://www.5432034.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.5432034.com/jb2011/archive/2018/12/25/433560.html</guid><wfw:comment>http://www.5432034.com/jb2011/comments/433560.html</wfw:comment><comments>http://www.5432034.com/jb2011/archive/2018/12/25/433560.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/jb2011/comments/commentRss/433560.html</wfw:commentRss><trackback:ping>http://www.5432034.com/jb2011/services/trackbacks/433560.html</trackback:ping><description><![CDATA[     鎽樿: 鏈枃?#32041;?#25956;浜?#26864;?#37722;戠兢鍙戣浜?#26946;?#37721;敤鏋舵瀯鍏?#28028;?#37721;?#28051;婄殑?#26499;绔?#37510;?#38001;?#38001;奌TTPS鐜?#28583;DNS浼樺寲?#32048;缇?#37733;続pp璇锋眰鑰?#37827;?#38010;傜害杩?#37719;婃渚?#37510;嬬殑閮?#37714;?#37712;?#28729;癸紝鎰熻?#24107;浣?#38000;?#37510;?銆佸紩瑷绉?#37716;?#27996;?#38001;旂綉鏃朵唬?#32029;APP 鍘傚晢涔嬮棿?#27537;绔?#27996;?#38344;炲父?#32314;鐑堬紝鑰岃壇濂界殑?#25956;鎴蜂綋楠?#37828;?#36423;?#26916;?#28028;?#37711;?#38000;冭?#25120;殑?#32029;缇?#37733;?#27996;搧浠?#26946;?#26864;?#37706;艰憲绉帮紝瀵?#27996;搧?#27537;?#25956;鎴蜂綋楠岄?#28850;父閲?#29785;?#37510;?#28000;?#37814;鏈殑瑙?#25652;?#37833;湅?#32029;瀹?#37812;风?#27537;?#32139;楠?#28028;樺寲?#32139;涓?DNS 浼樺寲鏄?#38344;炲父鍏抽敭?#27537;涓鐜紝鎬?#28052;堥檷浣?DNS ?#27537;鑰?#37827;?#37510;?#37804;?#28052;堝?#24531;?#25117;煙鍚嶅鎸佺瓑闂?#26864;橈紝閮?#37828;?#28598;?#28729;?..  <a href='http://www.5432034.com/jb2011/archive/2018/12/25/433560.html'>闃?#29831;?#37711;枃</a><img src ="http://www.5432034.com/jb2011/aggbug/433560.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/jb2011/" target="_blank">Jack Jiang</a> 2018-12-25 16:30 <a href="http://www.5432034.com/jb2011/archive/2018/12/25/433560.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>Android绔疘M搴旂敤涓殑@浜哄姛鑳?#28729;炵幇?#32048;浠垮井鍗?#37510;丵Q銆佸井淇紝闆?#37711;?#28186;?#37510;?#26946;?#37721;?#37813;?#28766;?/title><link>http://www.5432034.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.5432034.com/jb2011/archive/2018/12/23/433557.html</guid><wfw:comment>http://www.5432034.com/jb2011/comments/433557.html</wfw:comment><comments>http://www.5432034.com/jb2011/archive/2018/12/23/433557.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/jb2011/comments/commentRss/433557.html</wfw:commentRss><trackback:ping>http://www.5432034.com/jb2011/services/trackbacks/433557.html</trackback:ping><description><![CDATA[     鎽樿: 鏈枃鐢?#8220;鐚?#37910;iYao”?#24107;鍒?#37714;?#27996;紝鎰熻浣?#38000;?#37510;?銆佸紩瑷鏈杩?#37832;?#28051;?#38343;姹傦細璇勮@浜?#38171;堟病?#25930;?#32029;灏?#37828;疘M鑱婂鎴?#38000;呭井鍗欰PP閲岀殑@浜哄姛鑳?#38171;夛紝灏卞儚涓?#37733;?#26473;?#37837;凤細▲ ?#20117;淇?#32519;?#38001;婄?#23684;潰閲岀殑@浜哄姛鑳?nbsp;▲ QQ缇?#38001;婄?#23684;潰閲岀殑@浜哄姛鑳界綉涓婂凡缁?#37832;?#28051;浜涙枃绔?#37714;?#27996;?#27996;嗙被浼煎姛鑳?#28729;炵幇閫昏?#25135;紝浣?#37828;嚑涔?#38318;?#37828;?#37813;?#28766;旹ditText绫伙紝杩?#32457;?#28729;炵幇鏂瑰紡鑲?#28729;?#28051;?#38003;?#26473;?#37711;?#37812;戠殑棣?#37721;?#38339;?#28729;?#37510;?#28003;?#28000;?#28051;?#37828;?#37733;?#28051;?#28729;?#28051;?#32471;?#37722;堥潰鍚?#28725;硅薄鍏?#28598;?..  <a href='http://www.5432034.com/jb2011/archive/2018/12/23/433557.html'>闃?#29831;?#37711;枃</a><img src ="http://www.5432034.com/jb2011/aggbug/433557.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/jb2011/" target="_blank">Jack Jiang</a> 2018-12-23 21:31 <a href="http://www.5432034.com/jb2011/archive/2018/12/23/433557.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item></channel></rss> <a href="http://www.5432034.com/"><span class="STYLE1">11ѡ5ʱʱ</span></a> <div style="position:fixed;left:-9000px;top:-9000px;"><span id="ghavm"></span><font id="ghavm"><menu id="ghavm"><mark id="ghavm"><samp id="ghavm"></samp></mark></menu></font><object id="ghavm"></object><output id="ghavm"><s id="ghavm"><ol id="ghavm"></ol></s></output><rp id="ghavm"></rp><u id="ghavm"><span id="ghavm"><progress id="ghavm"><mark id="ghavm"></mark></progress></span></u><div id="ghavm"></div><option id="ghavm"></option><wbr id="ghavm"></wbr><sub id="ghavm"></sub><rp id="ghavm"></rp><li id="ghavm"><table id="ghavm"><menu id="ghavm"><sup id="ghavm"></sup></menu></table></li><samp id="ghavm"></samp><i id="ghavm"><noscript id="ghavm"><optgroup id="ghavm"></optgroup></noscript></i><dl id="ghavm"></dl><span id="ghavm"><xmp id="ghavm"><mark id="ghavm"><button id="ghavm"></button></mark></xmp></span><strike id="ghavm"><th id="ghavm"><dfn id="ghavm"></dfn></th></strike><span id="ghavm"><legend id="ghavm"></legend></span><blockquote id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></blockquote><p id="ghavm"><track id="ghavm"><nav id="ghavm"></nav></track></p><mark id="ghavm"></mark><dl id="ghavm"></dl><nav id="ghavm"><label id="ghavm"><tr id="ghavm"><div id="ghavm"></div></tr></label></nav><ins id="ghavm"><dl id="ghavm"></dl></ins><tr id="ghavm"></tr><address id="ghavm"><menuitem id="ghavm"><output id="ghavm"><button id="ghavm"></button></output></menuitem></address><p id="ghavm"><noframes id="ghavm"></noframes></p><video id="ghavm"></video><video id="ghavm"><thead id="ghavm"></thead></video><blockquote id="ghavm"></blockquote><progress id="ghavm"><var id="ghavm"><rt id="ghavm"></rt></var></progress><thead id="ghavm"></thead><source id="ghavm"><center id="ghavm"><code id="ghavm"></code></center></source><nobr id="ghavm"><input id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></input></nobr><button id="ghavm"></button><tr id="ghavm"><nobr id="ghavm"><var id="ghavm"><object id="ghavm"></object></var></nobr></tr><mark id="ghavm"><button id="ghavm"></button></mark><dd id="ghavm"></dd><ol id="ghavm"></ol><optgroup id="ghavm"></optgroup><td id="ghavm"></td><source id="ghavm"></source><span id="ghavm"><center id="ghavm"><mark id="ghavm"><u id="ghavm"></u></mark></center></span><samp id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></samp><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"><samp id="ghavm"></samp></dd></form></acronym><span id="ghavm"><sub id="ghavm"><mark id="ghavm"><ruby id="ghavm"></ruby></mark></sub></span><th id="ghavm"></th><pre id="ghavm"></pre><label id="ghavm"><video id="ghavm"></video></label><dd id="ghavm"></dd> <nobr id="ghavm"><var id="ghavm"><i id="ghavm"><em id="ghavm"></em></i></var></nobr><s id="ghavm"><noframes id="ghavm"><listing id="ghavm"><strong id="ghavm"></strong></listing></noframes></s><th id="ghavm"><thead id="ghavm"><b id="ghavm"></b></thead></th><ol id="ghavm"><span id="ghavm"></span></ol><ol id="ghavm"><td id="ghavm"><progress id="ghavm"><tt id="ghavm"></tt></progress></td></ol><strong id="ghavm"></strong><thead id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></thead><ins id="ghavm"><dl id="ghavm"></dl></ins><output id="ghavm"><pre id="ghavm"></pre></output><thead id="ghavm"></thead><th id="ghavm"><menu id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></menu></th><samp id="ghavm"><kbd id="ghavm"></kbd></samp><center id="ghavm"></center><code id="ghavm"><ol id="ghavm"><source id="ghavm"><progress id="ghavm"></progress></source></ol></code><legend id="ghavm"></legend><legend id="ghavm"><address id="ghavm"><font id="ghavm"></font></address></legend><span id="ghavm"></span><noframes id="ghavm"><code id="ghavm"></code></noframes><code id="ghavm"></code><noframes id="ghavm"><rt id="ghavm"><label id="ghavm"><legend id="ghavm"></legend></label></rt></noframes><dfn id="ghavm"></dfn><rp id="ghavm"></rp><button id="ghavm"></button><u id="ghavm"><span id="ghavm"></span></u><div id="ghavm"></div><kbd id="ghavm"></kbd><menuitem id="ghavm"></menuitem><progress id="ghavm"><mark id="ghavm"></mark></progress><acronym id="ghavm"><legend id="ghavm"><blockquote id="ghavm"></blockquote></legend></acronym><rp id="ghavm"></rp><track id="ghavm"></track><th id="ghavm"></th><tbody id="ghavm"></tbody><ins id="ghavm"><option id="ghavm"></option></ins><strong id="ghavm"></strong><font id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></font><samp id="ghavm"></samp><wbr id="ghavm"></wbr><address id="ghavm"><table id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></table></address><optgroup id="ghavm"></optgroup><span id="ghavm"></span><optgroup id="ghavm"></optgroup><tr id="ghavm"></tr><cite id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></cite><wbr id="ghavm"><small id="ghavm"></small></wbr><menu id="ghavm"></menu><tbody id="ghavm"><var id="ghavm"><i id="ghavm"></i></var></tbody><u id="ghavm"></u><wbr id="ghavm"></wbr><small id="ghavm"><dfn id="ghavm"></dfn></small> <table id="ghavm"></table><mark id="ghavm"></mark><nobr id="ghavm"><var id="ghavm"></var></nobr><tbody id="ghavm"><var id="ghavm"></var></tbody><sup id="ghavm"></sup><track id="ghavm"><listing id="ghavm"><cite id="ghavm"></cite></listing></track><meter id="ghavm"><delect id="ghavm"></delect></meter><menuitem id="ghavm"><acronym id="ghavm"></acronym></menuitem><i id="ghavm"></i><legend id="ghavm"><dd id="ghavm"></dd></legend><td id="ghavm"><menuitem id="ghavm"></menuitem></td><nav id="ghavm"><cite id="ghavm"><tr id="ghavm"><track id="ghavm"></track></tr></cite></nav><listing id="ghavm"></listing><option id="ghavm"><form id="ghavm"><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote></form></option><optgroup id="ghavm"><b id="ghavm"></b></optgroup><option id="ghavm"></option><pre id="ghavm"><td id="ghavm"><menuitem id="ghavm"></menuitem></td></pre><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote><menuitem id="ghavm"></menuitem><th id="ghavm"><bdo id="ghavm"></bdo></th><delect id="ghavm"><dl id="ghavm"><noframes id="ghavm"></noframes></dl></delect><u id="ghavm"><dl id="ghavm"><center id="ghavm"><blockquote id="ghavm"></blockquote></center></dl></u><td id="ghavm"><menuitem id="ghavm"><del id="ghavm"><wbr id="ghavm"></wbr></del></menuitem></td><track id="ghavm"><table id="ghavm"></table></track><samp id="ghavm"><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"></dd></form></acronym></samp><track id="ghavm"></track><b id="ghavm"><kbd id="ghavm"><th id="ghavm"><optgroup id="ghavm"></optgroup></th></kbd></b><menu id="ghavm"><s id="ghavm"><li id="ghavm"><listing id="ghavm"></listing></li></s></menu><noscript id="ghavm"></noscript><pre id="ghavm"></pre><font id="ghavm"></font><optgroup id="ghavm"><samp id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></samp></optgroup><dd id="ghavm"><samp id="ghavm"><acronym id="ghavm"></acronym></samp></dd><tt id="ghavm"><button id="ghavm"></button></tt><sub id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></sub><samp id="ghavm"></samp><strike id="ghavm"></strike><tt id="ghavm"><ol id="ghavm"></ol></tt><em id="ghavm"></em><ruby id="ghavm"></ruby><center id="ghavm"><mark id="ghavm"><u id="ghavm"><span id="ghavm"></span></u></mark></center><td id="ghavm"></td><i id="ghavm"><tr id="ghavm"><nobr id="ghavm"></nobr></tr></i><option id="ghavm"><center id="ghavm"><blockquote id="ghavm"><u id="ghavm"></u></blockquote></center></option><span id="ghavm"><xmp id="ghavm"><tt id="ghavm"><button id="ghavm"></button></tt></xmp></span><p id="ghavm"></p><code id="ghavm"></code><rt id="ghavm"></rt><acronym id="ghavm"></acronym><meter id="ghavm"></meter></div> <script>(function(){ var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743":"https://jspassport.ssl.qhimg.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743"; document.write('<script src="' + src + '" id="sozz"><\/script>'); })(); </script> <div style="position:fixed;left:-9000px;top:-9000px;"><span id="ghavm"></span><font id="ghavm"><menu id="ghavm"><mark id="ghavm"><samp id="ghavm"></samp></mark></menu></font><object id="ghavm"></object><output id="ghavm"><s id="ghavm"><ol id="ghavm"></ol></s></output><rp id="ghavm"></rp><u id="ghavm"><span id="ghavm"><progress id="ghavm"><mark id="ghavm"></mark></progress></span></u><div id="ghavm"></div><option id="ghavm"></option><wbr id="ghavm"></wbr><sub id="ghavm"></sub><rp id="ghavm"></rp><li id="ghavm"><table id="ghavm"><menu id="ghavm"><sup id="ghavm"></sup></menu></table></li><samp id="ghavm"></samp><i id="ghavm"><noscript id="ghavm"><optgroup id="ghavm"></optgroup></noscript></i><dl id="ghavm"></dl><span id="ghavm"><xmp id="ghavm"><mark id="ghavm"><button id="ghavm"></button></mark></xmp></span><strike id="ghavm"><th id="ghavm"><dfn id="ghavm"></dfn></th></strike><span id="ghavm"><legend id="ghavm"></legend></span><blockquote id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></blockquote><p id="ghavm"><track id="ghavm"><nav id="ghavm"></nav></track></p><mark id="ghavm"></mark><dl id="ghavm"></dl><nav id="ghavm"><label id="ghavm"><tr id="ghavm"><div id="ghavm"></div></tr></label></nav><ins id="ghavm"><dl id="ghavm"></dl></ins><tr id="ghavm"></tr><address id="ghavm"><menuitem id="ghavm"><output id="ghavm"><button id="ghavm"></button></output></menuitem></address><p id="ghavm"><noframes id="ghavm"></noframes></p><video id="ghavm"></video><video id="ghavm"><thead id="ghavm"></thead></video><blockquote id="ghavm"></blockquote><progress id="ghavm"><var id="ghavm"><rt id="ghavm"></rt></var></progress><thead id="ghavm"></thead><source id="ghavm"><center id="ghavm"><code id="ghavm"></code></center></source><nobr id="ghavm"><input id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></input></nobr><button id="ghavm"></button><tr id="ghavm"><nobr id="ghavm"><var id="ghavm"><object id="ghavm"></object></var></nobr></tr><mark id="ghavm"><button id="ghavm"></button></mark><dd id="ghavm"></dd><ol id="ghavm"></ol><optgroup id="ghavm"></optgroup><td id="ghavm"></td><source id="ghavm"></source><span id="ghavm"><center id="ghavm"><mark id="ghavm"><u id="ghavm"></u></mark></center></span><samp id="ghavm"><kbd id="ghavm"><th id="ghavm"></th></kbd></samp><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"><samp id="ghavm"></samp></dd></form></acronym><span id="ghavm"><sub id="ghavm"><mark id="ghavm"><ruby id="ghavm"></ruby></mark></sub></span><th id="ghavm"></th><pre id="ghavm"></pre><label id="ghavm"><video id="ghavm"></video></label><dd id="ghavm"></dd> <nobr id="ghavm"><var id="ghavm"><i id="ghavm"><em id="ghavm"></em></i></var></nobr><s id="ghavm"><noframes id="ghavm"><listing id="ghavm"><strong id="ghavm"></strong></listing></noframes></s><th id="ghavm"><thead id="ghavm"><b id="ghavm"></b></thead></th><ol id="ghavm"><span id="ghavm"></span></ol><ol id="ghavm"><td id="ghavm"><progress id="ghavm"><tt id="ghavm"></tt></progress></td></ol><strong id="ghavm"></strong><thead id="ghavm"><ins id="ghavm"><option id="ghavm"></option></ins></thead><ins id="ghavm"><dl id="ghavm"></dl></ins><output id="ghavm"><pre id="ghavm"></pre></output><thead id="ghavm"></thead><th id="ghavm"><menu id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></menu></th><samp id="ghavm"><kbd id="ghavm"></kbd></samp><center id="ghavm"></center><code id="ghavm"><ol id="ghavm"><source id="ghavm"><progress id="ghavm"></progress></source></ol></code><legend id="ghavm"></legend><legend id="ghavm"><address id="ghavm"><font id="ghavm"></font></address></legend><span id="ghavm"></span><noframes id="ghavm"><code id="ghavm"></code></noframes><code id="ghavm"></code><noframes id="ghavm"><rt id="ghavm"><label id="ghavm"><legend id="ghavm"></legend></label></rt></noframes><dfn id="ghavm"></dfn><rp id="ghavm"></rp><button id="ghavm"></button><u id="ghavm"><span id="ghavm"></span></u><div id="ghavm"></div><kbd id="ghavm"></kbd><menuitem id="ghavm"></menuitem><progress id="ghavm"><mark id="ghavm"></mark></progress><acronym id="ghavm"><legend id="ghavm"><blockquote id="ghavm"></blockquote></legend></acronym><rp id="ghavm"></rp><track id="ghavm"></track><th id="ghavm"></th><tbody id="ghavm"></tbody><ins id="ghavm"><option id="ghavm"></option></ins><strong id="ghavm"></strong><font id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></font><samp id="ghavm"></samp><wbr id="ghavm"></wbr><address id="ghavm"><table id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></table></address><optgroup id="ghavm"></optgroup><span id="ghavm"></span><optgroup id="ghavm"></optgroup><tr id="ghavm"></tr><cite id="ghavm"><sup id="ghavm"><track id="ghavm"></track></sup></cite><wbr id="ghavm"><small id="ghavm"></small></wbr><menu id="ghavm"></menu><tbody id="ghavm"><var id="ghavm"><i id="ghavm"></i></var></tbody><u id="ghavm"></u><wbr id="ghavm"></wbr><small id="ghavm"><dfn id="ghavm"></dfn></small> <table id="ghavm"></table><mark id="ghavm"></mark><nobr id="ghavm"><var id="ghavm"></var></nobr><tbody id="ghavm"><var id="ghavm"></var></tbody><sup id="ghavm"></sup><track id="ghavm"><listing id="ghavm"><cite id="ghavm"></cite></listing></track><meter id="ghavm"><delect id="ghavm"></delect></meter><menuitem id="ghavm"><acronym id="ghavm"></acronym></menuitem><i id="ghavm"></i><legend id="ghavm"><dd id="ghavm"></dd></legend><td id="ghavm"><menuitem id="ghavm"></menuitem></td><nav id="ghavm"><cite id="ghavm"><tr id="ghavm"><track id="ghavm"></track></tr></cite></nav><listing id="ghavm"></listing><option id="ghavm"><form id="ghavm"><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote></form></option><optgroup id="ghavm"><b id="ghavm"></b></optgroup><option id="ghavm"></option><pre id="ghavm"><td id="ghavm"><menuitem id="ghavm"></menuitem></td></pre><blockquote id="ghavm"><ruby id="ghavm"></ruby></blockquote><menuitem id="ghavm"></menuitem><th id="ghavm"><bdo id="ghavm"></bdo></th><delect id="ghavm"><dl id="ghavm"><noframes id="ghavm"></noframes></dl></delect><u id="ghavm"><dl id="ghavm"><center id="ghavm"><blockquote id="ghavm"></blockquote></center></dl></u><td id="ghavm"><menuitem id="ghavm"><del id="ghavm"><wbr id="ghavm"></wbr></del></menuitem></td><track id="ghavm"><table id="ghavm"></table></track><samp id="ghavm"><acronym id="ghavm"><form id="ghavm"><dd id="ghavm"></dd></form></acronym></samp><track id="ghavm"></track><b id="ghavm"><kbd id="ghavm"><th id="ghavm"><optgroup id="ghavm"></optgroup></th></kbd></b><menu id="ghavm"><s id="ghavm"><li id="ghavm"><listing id="ghavm"></listing></li></s></menu><noscript id="ghavm"></noscript><pre id="ghavm"></pre><font id="ghavm"></font><optgroup id="ghavm"><samp id="ghavm"><kbd id="ghavm"><legend id="ghavm"></legend></kbd></samp></optgroup><dd id="ghavm"><samp id="ghavm"><acronym id="ghavm"></acronym></samp></dd><tt id="ghavm"><button id="ghavm"></button></tt><sub id="ghavm"><cite id="ghavm"><ruby id="ghavm"></ruby></cite></sub><samp id="ghavm"></samp><strike id="ghavm"></strike><tt id="ghavm"><ol id="ghavm"></ol></tt><em id="ghavm"></em><ruby id="ghavm"></ruby><center id="ghavm"><mark id="ghavm"><u id="ghavm"><span id="ghavm"></span></u></mark></center><td id="ghavm"></td><i id="ghavm"><tr id="ghavm"><nobr id="ghavm"></nobr></tr></i><option id="ghavm"><center id="ghavm"><blockquote id="ghavm"><u id="ghavm"></u></blockquote></center></option><span id="ghavm"><xmp id="ghavm"><tt id="ghavm"><button id="ghavm"></button></tt></xmp></span><p id="ghavm"></p><code id="ghavm"></code><rt id="ghavm"></rt><acronym id="ghavm"></acronym><meter id="ghavm"></meter></div> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>