2010-11-11 45 views
0

嘿傢伙,最近我在aspnet MVC上工作Repository Pattern,我只是想知道,我的意思是有多少不同的模式(即替代存儲庫模式)?請我需要每個模式可用的小解釋..?在所有這些模式中,你會推薦我去做什麼?什麼是不同類型的設計模式?

+2

http://stackoverflow.com/questions/244706/learning-implementing-design-patterns-for-newbies,http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns,http ://stackoverflow.com/questions/449731/design-patterns-to-avoid,http://stackoverflow.com/questions/105049/what-are-the-best-design-patterns-books-you-have-read http://stackoverflow.com/questions/49974/what-design-patterns-do-you-use-most-often – JoseK 2010-11-11 08:50:27

+1

請儘量不要像你說的那樣寫。你的問題似乎很困惑。你有沒有嘗試尋找自己的一些替代品? – 2010-11-11 09:34:00

+0

雅我搜索谷歌,我發現單身人士和工廠方法等維基百科,但這些不是'儲存庫模式'的替代 – FosterZ 2010-11-11 09:38:51

回答

2

我還沒有聽說過Repository Pattern,所以它不是GoFs initial set的一部分。快速google顯示它是Martin Fowler的一部分Patterns of Enterprise Application Architecture(這是一本我想要回憶的好書,但是保留在頭上的許多模式)。 查看PoEAA的index和​​生活在對象關係元數據映射模式子集。在POEAA指定的替代方案是:

然而其它圖案儲存庫可包括其他選項。

+0

thnx,好書,的確如此 – FosterZ 2010-11-11 10:21:09

-1

GOF模式a基本上分爲4類,即創建模式,行爲模式和結構模式。

+1

你說4,但答案只有3;) – 2012-07-18 09:11:58