有哪些优质领域模型的优秀开源 C# 示例

发布于 2024-07-25 18:17:13 字数 1542 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

祁梦 2024-08-01 18:17:13

我非常喜欢 http://www.codeplex.com/oxite 上的 oxite cms 架构。 我从那个项目中学到了很多。 我使用 nhibernate 而不是 linq2sql 进行数据访问,它对我很有用。 当然,这不是一个大型项目,但却是一个完美的开始。 CSLA 不遵循 DDD 范式。

上面的书“.NET Domain-Driven Design with C#” by Tim McCarthy (Wrox Press) 确实是一本很好的书。

理解 DDD 的最好的书是 领域驱动设计:解决软件核心的复杂性 作者:Eric Evans。这本书是优秀 DDD 设计的“圣经”。

除此之外,还有许多资源可以在 http://dddcommunity.org/ 上找到,您可以在这里找到来自 DDD 专家的更多视频和文章,包括 Eric Evans 和有一个良好的 DDD 设计的示例应用程序,但不幸的是它是在 java 中:(

I liked lot the architecture of oxite cms at http://www.codeplex.com/oxite. I learned lot from that project. I use nhibernate for data access instead of linq2sql and it works good for me. Of course its not a large scale project but its a perfect start. CSLA does not follow the DDD paradigm.

The above book ".NET Domain-Driven Design with C#" by Tim McCarthy (Wrox Press)" is really good one.

The best book for understanding DDD is Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans. This book is the "bible" of good DDD design.

Beyond that many resources can be found on http://dddcommunity.org/. There you can find more videos and articles from DDD experts including Eric Evans and there is a sample application of good DDD design but unfortunately its in java :(

风和你 2024-08-01 18:17:13

你可以看看 nopCommerce 我用它来尝试它工作得非常好,它很好地实现了 DDD 和BO,非常通用且快速,安装模式也很经典,所以如果您的目标是网络应用程序,您也可以检查一下。

You could check out nopCommerce i used it to try it work really nice and it has a good implemantation of DDD and BO, quite generic and fast, the install pattern is olso a classic so if you aiming a web apps you could check this out too.

香草可樂 2024-08-01 18:17:13

看看 Martin Fowler 的书《分析模式》。 这是一本老书,所以类图不是 UML,而是一些古老的东西(幸运的是,封面和封底包含了图符号的描述)。

而且它没有 C# 代码。 事实上它根本没有任何代码,因为它不是一本关于代码的书,而是一本关于领域模型的书。 但它确实有值得崇拜的领域模型!

Have a look at Martin Fowler's book, Analysis Patterns. It's an old book, so the class diagrams are not UML but something ancient (fortunately, the front and rear cover contains a description of the diagrams symbols).

And it doesn't have C# code. In fact it doesn't have any code at all because it is not a book about code, but a book about domain models. But it does have domain models to die for!

扬花落满肩 2024-08-01 18:17:13

虽然这并不完全符合您的要求,但 iDesign 的 Juval Lowy 编写了一些精彩的 WCF 示例可解决您上面提到的许多情况。

Tim McCarthy(Wrox Press)所著的《.NET Domain-Driven Design with C#》一书也可能令人感兴趣。

While it's not exactly what you asked for, Juval Lowy of iDesign has coded up some wonderful WCF Samples that tackle many of the situations you mention above.

The book ".NET Domain-Driven Design with C#" by Tim McCarthy (Wrox Press) might also be of interest.

逆光飞翔i 2024-08-01 18:17:13

我会看一下 CSLA 及其示例应用程序 ProjectTracker。 在工作中,我使用 CSLA 完成了几个项目,它确实可以帮助您的 BO 变得更加强大和强大。 有用。

虽然 ProjectTracker 不是真实世界的领域模型,但它确实涵盖了真实领域模型所需的许多情况。 因此,如果您查看利用 CSLA 的 BO 层提供的功能,您就会很好地了解好的域模型应该是什么样子。

I'd take a look at CSLA and its sample application, ProjectTracker. Here at work I've done a few projects using CSLA and it really does help your BOs be much more powerful & useful.

While ProjectTracker is not a real-world domain model it does cover a lot of the situations that a real domain model would need to. So if you look at the features offered by BO layers utilizing CSLA you'll get a good idea of what good domain models should look like.

久夏青 2024-08-01 18:17:13

Rob Connery(MVC Storefront 和 Weke Road 博客的)http://blog.wekeroad.com/ 已最近进入DDD。 MVC Storefront 应用程序可能会被修改以反映他的学习成果,至少我相信是这样。 无论如何,他有一些关于这个主题的好材料。

网站 http://www.domaindrivendesign.org 有一个 C# 示例应用程序。

关于 DDD 的一件事; 它往往与它所针对的业务紧密结合(在积极意义上)。 因此,最好的示例可能与 IP 相关,不太可能作为操作系统提供。

我倾向于看到的设计类型通常是贫血领域模型。

Rob Connery (of MVC Storefront and Weke Road blog) http://blog.wekeroad.com/ has been getting into DDD of late. The MVC Storefront app may be modified to reflect his learnings, or so I believe. Regardless, he has some good material on this topic.

The website http://www.domaindrivendesign.org has a C# sample app.

One thing about DDD; it tends to be tightly coupled (in the positive sense) with the bsuiness for which it is written. As a result, the best examples are probably tied up in IP and unlikely to be available as OS.

The kind of design I tend to see is usually the anaemic domain model.

秋意浓 2024-08-01 18:17:13

我希望我能告诉你我有一个很好的推荐,因为我很乐意看到这个问题得到一致的全垒打选择的回答。 但正如 objektivs 观察到的那样,

...最好的例子可能与 IP 相关,不太可能作为操作系统提供。

然而,我们在一个领域拥有丰富的开源代码:软件开发工具。

这是一种逃避(我也没有做过跑腿工作),但如果这个问题无法产生可靠的选择,并且您想自己追求这个,我建议您从我们许多人使用的一些更成熟的工具开始已经使用:NUnitDotNetNukeScrewTurnWikiNAnt 等。它们有几个明显的优势,其中最重要的是您已经可以(相对)访问它们的域模型。

I wish I could tell you that I had a great recommendation, since I would love to see this question answered with a consensus home-run choice. But as objektivs observed,

... the best examples are probably tied up in IP and unlikely to be available as OS.

However, there's one domain for which we have abundant open-source code: software development tools.

This is a cop-out (I haven't done the legwork either), but if this question fails to produce a solid choice and you want to pursue this yourself, I would recommend starting with some of the more mature tools that many of us already use: NUnit, DotNetNuke, ScrewTurnWiki, NAnt, etc.. They have several distinct advantages, not the least of which is that their domain models will already be (relatively) accessible to you.

幼儿园老大 2024-08-01 18:17:13

我最近看到了关于使用 MVC、nHibernate、AutoMapper 构建论坛应用程序的教程,我发现源代码编写得非常好,结构也非常好,其中有关于在 Web 应用程序、域模型和存储库/服务中使用 NH/FluentNH 的很好的示例:
http://mattias-jakobsson.net/Item /45/建筑%20a%20forum%20application,%20Part%209

I recently come across tutorial on building Forum application with MVC, nHibernate, AutoMapper, and I find source code really good written and structured, with nice examples on using NH/FluentNH in web apps, domain model and repositories/services:
http://mattias-jakobsson.net/Item/45/Building%20a%20forum%20application,%20Part%209

孤檠 2024-08-01 18:17:13

您是否考虑过重新审视城堡项目

来自 Castle 项目“Castle 是一个 .net 开源项目,旨在简化企业和 Web 应用程序的开发。Castle 提供一组工具(一起工作或独立工作)并与其他开源项目集成,可帮助您获得更多使用更少的代码和更短的时间完成。”

Have you considered reviwing the Castle Project?

From the Castle Project "Castle is an open source project for .net that aspires to simplify the development of enterprise and web applications. Offering a set of tools (working together or independently) and integration with others open source projects, Castle helps you get more done with less code and in less time."

献世佛 2024-08-01 18:17:13

我会看一下 dofactory GoF 网站。 他们有很多示例,您可以以相当低的价格购买,包括:
* MVC -- ASP.NET Web 应用程序
* MVP -- Windows 窗体应用程序
* MVVM -- WPF 应用
它还包括两本非常好的书:《Enterprise Design Patterns》和《Head First Design Patterns》

I would take a look at the dofactory GoF site. They have a bunch of examples that you can purchase for a pretty small price including:
* MVC -- ASP.NET Web Application
* MVP -- Windows Forms Application
* MVVM -- WPF Appication
It also includes two very good books: "Enterprise Design Patterns" and "Head First Design Patterns"

雪化雨蝶 2024-08-01 18:17:13

我目前正在使用 StuctureMap流畅的 NHibernate, Asp.net MVC, AutoMapper, CastlexVal 框架。 我一直从示例项目 Nerd Dining 和 Code Camp Server 获得帮助。 如果您对这些框架有任何疑问,请告诉我。

http://code.google.com/p/codecampserver/

http://nerddinner.codeplex.com/

I'm currently working on a project using StuctureMap, Fluent NHibernate, Asp.net MVC, AutoMapper, Castle, and xVal frameworks. I've been getting help from the sample projects Nerd Dinner and Code Camp Server. Please let me know if you have questions about any of these frameworks.

http://code.google.com/p/codecampserver/

http://nerddinner.codeplex.com/

独自唱情﹋歌 2024-08-01 18:17:13

GitHub 上查看我的完整 Visual Studio 解决方案,您可以将其用作快速入门因为它包含一个非常简单但分层的架构。

我在我的博客 http://thomasjaeger.wordpress.com 上发布了有关对象持久性的详细视频探究解决方案中为何以及如何使用集中式域模型的原因。

Take a look at my complete Visual Studio solution on GitHub that you can use as a jump start because it includes a very simple but layered architecture.

I've published detailed videos on object persistence on my blog at http://thomasjaeger.wordpress.com where I go into the reasons of the why and how of a centralized domain model in the solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文