|
|
1
3
I would recommend some projects like NServiceBus 广泛使用多态性(更不用说NService总线API是我使用过的最好的API之一)。也考虑一些类似的东西 StructureMap , which uses a model-based configuration API (I actually use Ninject 作为我的国际奥委会的选择,它也可以证明有一些有趣的代码。我很难指出这些项目是否使用特定的设计模式,以及它可以使用多少,但是我知道他们使用一些现代API和现代方法来进行面向对象的设计。 I would say, though, that your best bet is going to be to find an open source project that you find interesting, or that you use regularly, and crack it open and see what makes it tick. If you are familiar with the details of using the code (whatever it may be), then you will probably gain more insight be looking at the code because you know what it is doing. |
|
|
2
2
我总是推荐 .NET Domain-Driven Design with C#: Problem-Design-Solution 示例代码-Smartca项目。它的布局非常优雅,每当我对我的建筑有疑问时,我都会重新回到它上面。 你也应该下载和退房。 ASP .NET MVC source code |
|
|
3
1
我建议你去看看罗斯文的入门包( http://nsk.codeplex.com/ )-它涵盖了许多设计模式及其在.NET框架中的应用程序,包括SOA和MVC/MVP/PM概念。它还包括一些其他免费使用的库的例子,如微软实体框架和NHibernate。 我个人对它们显示相同后端可以用于WPF和ASP.NET的方式特别满意。 |