<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gd="http://schemas.google.com/g/2005"><id>tag:blogger.com,1999:blog-4500363753981919783.post6408165200893514118..comments</id><updated>2023-10-03T22:06:50.708+08:00</updated><title type='text'>Comments on Huan-Lin 學習筆記: Dependency Injection 筆記 (5)</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://www.huanlintalk.com/feeds/comments/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html'/><link rel="hub" href="http://pubsubhubbub.appspot.com/"/><author><name>Michael Tsai</name><uri>http://www.blogger.com/profile/00364693770445538641</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-4703962805782074721</id><published>2012-03-09T20:37:59.187+08:00</published><updated>2012-03-09T20:37:59.187+08:00</updated><title type='text'>阿德:&#xa;你的這篇留言提醒了我,原先要寫的筆記還沒寫完哩!得找時間再整理一下。&#xa;謝啦 ^^</title><content type='html'>阿德:&lt;br /&gt;你的這篇留言提醒了我,原先要寫的筆記還沒寫完哩!得找時間再整理一下。&lt;br /&gt;謝啦 ^^</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/4703962805782074721'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/4703962805782074721'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1331296679187#c4703962805782074721' title=''/><author><name>Michael Tsai</name><uri>https://www.blogger.com/profile/00364693770445538641</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1825873726"/><gd:extendedProperty name="blogger.displayTime" value="2012/3/9 晚上8:37"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-8246193881456005320</id><published>2012-03-09T14:26:55.173+08:00</published><updated>2012-03-09T14:26:55.173+08:00</updated><title type='text'>如果真有翻譯書,替我們這些看原文書較吃力的潛水戶來說,真是一大福音呀!&#xa;畢竟在台灣推廣它或者讓身邊的...</title><content type='html'>如果真有翻譯書,替我們這些看原文書較吃力的潛水戶來說,真是一大福音呀!&lt;br /&gt;畢竟在台灣推廣它或者讓身邊的同事朋友來接觸這個領域的東西,也相對容易。&lt;br /&gt;^^&lt;br /&gt;&lt;br /&gt;很感謝您的分享</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/8246193881456005320'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/8246193881456005320'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1331274415173#c8246193881456005320' title=''/><author><name>阿德</name><uri>https://www.blogger.com/profile/03021463840801532032</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-670982772"/><gd:extendedProperty name="blogger.displayTime" value="2012/3/9 下午2:26"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-6681980303282037285</id><published>2011-11-25T11:12:25.822+08:00</published><updated>2011-11-25T11:12:25.822+08:00</updated><title type='text'>多謝誇獎 :)&#xa;曾有翻譯本書的念頭,但這本書真的就如你所說,質量兼具,將近 600 頁,對翻譯來說,...</title><content type='html'>多謝誇獎 :)&lt;br /&gt;曾有翻譯本書的念頭,但這本書真的就如你所說,質量兼具,將近 600 頁,對翻譯來說,這&amp;quot;量&amp;quot;還真不少。而且...雖然我知道台灣仍有開發人員對此議題感興趣(例如您和 91 兄以及其他潛水的朋友),但市場還是太小,只能靠興趣支撐。這個系列的筆記,我自己也不知道能寫幾集。就隨緣吧! ^_^</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/6681980303282037285'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/6681980303282037285'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1322190745822#c6681980303282037285' title=''/><author><name>Michael Tsai</name><uri>https://www.blogger.com/profile/00364693770445538641</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1825873726"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/25 上午11:12"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-5791751743355576293</id><published>2011-11-25T10:41:23.581+08:00</published><updated>2011-11-25T10:41:23.581+08:00</updated><title type='text'>Hi Huanlin 您說對了,我看的是先出版的那一本。十月出版的這一本,其實 MEAP 的時候就有...</title><content type='html'>Hi Huanlin 您說對了,我看的是先出版的那一本。十月出版的這一本,其實 MEAP 的時候就有先看了。不管如何,這兩本都是質量兼具的書。您是國內有名的譯者(作者),有打算對這一本進行翻譯嗎?亦或是以您的觀點,出版中文書(紙本或是數位)也許都不錯。不過要擔心的是,這種議題的書,不太好賣就是了。雖然有樓上的 91 哥撰寫了大量的文章來推廣,不過要引起廣大共鳴真的不容易。anyway, 謝謝您願意花時間撰寫這類的文,我繼續長期潛水去 :)</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/5791751743355576293'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/5791751743355576293'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1322188883581#c5791751743355576293' title=''/><author><name>被軟體開發耽誤的廚工</name><uri>https://www.blogger.com/profile/00144958407872087293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-218799269"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/25 上午10:41"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-823990376361699150</id><published>2011-11-24T20:38:00.494+08:00</published><updated>2011-11-24T20:38:00.494+08:00</updated><title type='text'>To IT Player:&#xa;我原先以為你講的書就是我目前在看的 DI in .NET (最近剛出版)...</title><content type='html'>To IT Player:&lt;br /&gt;我原先以為你講的書就是我目前在看的 DI in .NET (最近剛出版)。但剛剛突然想到,Manning 在 2009 年有出一本書:Dependency Injection。我猜你指的 DI 書籍應該是後者。</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/823990376361699150'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/823990376361699150'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1322138280494#c823990376361699150' title=''/><author><name>Michael Tsai</name><uri>https://www.blogger.com/profile/00364693770445538641</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1825873726"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/24 晚上8:38"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-5406508960778420089</id><published>2011-11-24T14:02:59.187+08:00</published><updated>2011-11-24T14:02:59.187+08:00</updated><title type='text'>的確,我也覺得這本書寫得不錯,也能適時填補目前台灣的程式設計書籍的技術區塊。所以每看一點,就整理一些...</title><content type='html'>的確,我也覺得這本書寫得不錯,也能適時填補目前台灣的程式設計書籍的技術區塊。所以每看一點,就整理一些筆記和自己的想法。&lt;br /&gt;&lt;br /&gt;跟您的經驗雷同,我先前也比較常買歐萊禮的書,還有 Addison Wesley。</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/5406508960778420089'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/5406508960778420089'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1322114579187#c5406508960778420089' title=''/><author><name>Michael Tsai</name><uri>https://www.blogger.com/profile/00364693770445538641</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1825873726"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/24 下午2:02"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-6337729397135319944</id><published>2011-11-24T13:58:19.670+08:00</published><updated>2011-11-24T13:58:19.670+08:00</updated><title type='text'>這本剛發行的時候就拿到也讀過了,非常推薦。&#xa;&#xa;在這本書出來之前,因為使用 Spring 作為 IoC...</title><content type='html'>這本剛發行的時候就拿到也讀過了,非常推薦。&lt;br /&gt;&lt;br /&gt;在這本書出來之前,因為使用 Spring 作為 IoC 的主要舞台,花了不少時間讀了 Spring 的文件。&lt;br /&gt;裡面的內容跟一些觀念,小提醒也都很棒。&lt;br /&gt;&lt;br /&gt;Manning 這幾年的書,質量俱佳。遙想當年技術類書,首選 O&amp;#39;Reilly。&lt;br /&gt;&lt;br /&gt;Manning Dependency Injection 這本書的確值得一讀。</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/6337729397135319944'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/6337729397135319944'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1322114299670#c6337729397135319944' title=''/><author><name>被軟體開發耽誤的廚工</name><uri>https://www.blogger.com/profile/00144958407872087293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-218799269"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/24 下午1:58"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-4037436145260365351</id><published>2011-11-20T00:03:44.756+08:00</published><updated>2011-11-20T00:03:44.756+08:00</updated><title type='text'>91 兄過獎了。一起努力 ^_^</title><content type='html'>91 兄過獎了。一起努力 ^_^</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/4037436145260365351'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/4037436145260365351'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1321718624756#c4037436145260365351' title=''/><author><name>Michael Tsai</name><uri>https://www.blogger.com/profile/00364693770445538641</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1825873726"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/20 凌晨12:03"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-2254179370136443952</id><published>2011-11-19T23:42:20.523+08:00</published><updated>2011-11-19T23:42:20.523+08:00</updated><title type='text'>只能說對這系列文章相見恨晚啊。&#xa;&#xa;雖然懂老師提的一些觀念,但從老師的精準用字遣詞與淺顯易懂的描述,還...</title><content type='html'>只能說對這系列文章相見恨晚啊。&lt;br /&gt;&lt;br /&gt;雖然懂老師提的一些觀念,但從老師的精準用字遣詞與淺顯易懂的描述,還有太多太多值得我學習的地方 。&lt;br /&gt;&lt;br /&gt;希望有朝一日也能跟老師一樣,是除了自己懂以外,還能讓別人懂</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/2254179370136443952'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/2254179370136443952'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1321717340523#c2254179370136443952' title=''/><author><name>91</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1283929094"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/19 晚上11:42"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-7698525788089073577</id><published>2011-11-19T22:25:41.559+08:00</published><updated>2011-11-19T22:25:41.559+08:00</updated><title type='text'>Wow! 91 的回應真快! 此系列的這幾篇文章,到目前為止都還僅止於入門層次,我想對你來說應該是小...</title><content type='html'>Wow! 91 的回應真快! 此系列的這幾篇文章,到目前為止都還僅止於入門層次,我想對你來說應該是小菜一碟吧。如有謬誤,請多指正喔。</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/7698525788089073577'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/7698525788089073577'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1321712741559#c7698525788089073577' title=''/><author><name>Michael Tsai</name><uri>https://www.blogger.com/profile/00364693770445538641</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1825873726"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/19 晚上10:25"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-175023962379284548</id><published>2011-11-19T22:19:08.556+08:00</published><updated>2011-11-19T22:19:08.556+08:00</updated><title type='text'>真的相當期待老師將這整系列的文章,整理成冊。&#xa;&#xa;應該會是初階與中階SD最需要的一本書了。</title><content type='html'>真的相當期待老師將這整系列的文章,整理成冊。&lt;br /&gt;&lt;br /&gt;應該會是初階與中階SD最需要的一本書了。</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/175023962379284548'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/175023962379284548'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1321712348556#c175023962379284548' title=''/><author><name>91</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1283929094"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/19 晚上10:19"/></entry><entry><id>tag:blogger.com,1999:blog-4500363753981919783.post-7452683598354994255</id><published>2011-11-19T22:16:10.324+08:00</published><updated>2011-11-19T22:16:10.324+08:00</updated><title type='text'>不用寫、不用管實作介面的concrete class,而只需要介面就可以完成程式的邏輯與測試,這爽度...</title><content type='html'>不用寫、不用管實作介面的concrete class,而只需要介面就可以完成程式的邏輯與測試,這爽度真的超高的。&lt;br /&gt;&lt;br /&gt;沒有IoC,沒有透過介面來隔離類別的相依性,連測都沒法測。不過,實際上碰到的經驗,很多dev光卡在介面的建立,就望之卻步了。&lt;br /&gt;&lt;br /&gt;順便分享一下,在老師這個範例中為了單元測試而將介面拉到建構式中,我在重構與導入單元測試時中有個特別的經驗,折衷的作法是直接把instance塞給private的field或property:&lt;br /&gt;&lt;br /&gt; private ILogger logger = new myLogger();&lt;br /&gt;&lt;br /&gt;而不透過public property或建構式來決定實作介面的instance。&lt;br /&gt;&lt;br /&gt;好處是改動幅度小,可針對單支類別改動與撰寫測試,而且透過Visual Studio的Accessor,可以直接去mock private的field與property,進而做到單元測試中,可與外部類別隔離。&lt;br /&gt;&lt;br /&gt;壞處是這是偷吃步的作法,只是為了測試而進行的重構,而非為了讓原本production code品質提升,降低類別耦合性,導致使用此類別的場景,無法透過public的介面,來自由抽換要使用的instance。&lt;br /&gt;&lt;br /&gt;一點小經驗,藉著老師這主題,分享一下。</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/7452683598354994255'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4500363753981919783/6408165200893514118/comments/default/7452683598354994255'/><link rel='alternate' type='text/html' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html?showComment=1321712170324#c7452683598354994255' title=''/><author><name>91</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.huanlintalk.com/2011/11/dependency-injection-5.html' ref='tag:blogger.com,1999:blog-4500363753981919783.post-6408165200893514118' source='http://www.blogger.com/feeds/4500363753981919783/posts/default/6408165200893514118' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1283929094"/><gd:extendedProperty name="blogger.displayTime" value="2011/11/19 晚上10:16"/></entry></feed>