在.NET Framework中是否有任何设计模式? [英] Are there any design patterns used in the .NET Framework?

查看:144
本文介绍了在.NET Framework中是否有任何设计模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道: GoF 的设计模式是否用于 .NET Framework



BOUNTY:



我已经在一个答案中看到了MSDN链接。有没有任何帖子/视频,或者可以列出模式,最重要的是在哪里使用?

解决方案

这是一篇文章,这个主题:



http://msdn.microsoft.com/en-us/magazine/cc188707.aspx



现在可以使用ASP.NET添加MVC模式MVC。 :)



编辑:由于您编辑/请求更多信息:



这是一篇列出几种模式的文章并在框架中使用它们。
http://www.jot.fm/issues/issue_2006_11/article1.pdf



.NET中的提供者都是提供者模型模式。
http://msdn.microsoft.com/en-us/library /aa479030.aspx



.NET中的提供者模式也使用策略模式。



工厂模式在几个地方使用,这里是ASP.NET中使用的示例。
http://msdn.microsoft.com/en-us/library /ms954600.aspx



以下是 DP 在.NET中:
http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?culture=en-US&EventID=1032293567&CountryCode=US



我没有看过它,所以我不知道它们在框架中的使用情况有多少...



如在注释中已经提到的,GoF模式可能全部在.NET框架中使用。哪里并不完全是最简单的答案,因为框架是巨大的,除非MS发布在某些示例中列出,因为它并不总是显而易见的。更熟悉的是一个模式,你可能会注意到一个正在使用它的框架类。



希望我添加的额外链接可以帮助你。 >

此外, http://www.dofactory.com /Framework/Framework.aspx 有一个出售套件($ 79-99),关于如何在.NET中使用/实现GoF模式,但他们在阅读时列出了他们还将解释MS在哪里使用它们框架。


I would like to know: are any GoF design patterns are used in the .NET Framework?

BOUNTY:

I have seen the MSDN link below in an answer. Are there any post/video or can you can list patterns and most importantly WHERE it is used?

解决方案

Here's an article that discusses this very topic:

http://msdn.microsoft.com/en-us/magazine/cc188707.aspx

And now the MVC pattern can be added with ASP.NET MVC. :)

EDIT: Since your edit / request for more info:

Here's an article that lists several patterns and where they are used in the framework. http://www.jot.fm/issues/issue_2006_11/article1.pdf

The Providers in .NET are all the Provider model pattern. http://msdn.microsoft.com/en-us/library/aa479030.aspx

The provider patterns in .NET also use the Strategy Pattern.

The factory pattern is used in several places and here's a sample where it's used in ASP.NET. http://msdn.microsoft.com/en-us/library/ms954600.aspx

Here's a webcast on DP's in .NET: http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?culture=en-US&EventID=1032293567&CountryCode=US

I haven't watched it so I am not sure how much it goes into how they are used in the Framework...

As already mentioned in a comment, the GoF patterns are likely all in use in the .NET framework. Where is not exactly the easiest to answer as the framework is massive and unless MS publishes as such listed in some of the examples given it is not always obvious. The more familiar one is with a pattern the more likely you would notice a framework class that was employing it.

Hopefully the extra links I have added help you.

Additionally, http://www.dofactory.com/Framework/Framework.aspx has a for sale kit ($79-99) that is about teaching how to use/implement GoF patterns in .NET BUT they do list on the reading they will also explain where MS uses them in the Framework.

这篇关于在.NET Framework中是否有任何设计模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆