Question

I'm trying to understand the concepts behind DDD, but I find it hard to understand just by reading books as they tend to discuss the topic in a rather abstract way. I would like to see some good implementations of DDD in code, preferably in C#.

Are there any good examples of projects practicing DDD in the open source world?

Was it helpful?

Solution

Eric Evans and a Swedish consulting company have released a sample application based on the shipping example that Eric uses throughout the book. It's in Java, but the concepts are well documented on the project page.

http://dddsample.sourceforge.net/

However, be warned that DDD is more about the journey than the destination. Understand that the sample code you are looking took many forms before it became what you see now. You did not see the awkward models that were used initially and you're missing the steps taken to refactor the model based on insight gained along the way. While the building blocks are important in DDD, Eric belives they are over-emphasized, so take all samples with a grain of salt.

OTHER TIPS

I'm not sure how complete it is, but I found the NDDD Sample on Google Code.

I'm surprised no one mentioned Macto, Ayende's DDD sample. The most important thing about Macto is that the hole thinking process before the actual coding is presented in a series of posts. DDD is not about implementing a model, is about modeling a business domain. Decisions like "some concept is an Aggregate Root/Entity/Value Object" are far more important than how will an AR be persisted.

Also i would recommend Udi Dahan's videos about SOA and CQRS which might provide a better context on which to apply DDD.

This is not an open source project, but still it is an example in code: http://www.codeplex.com/dddpds

The example is used in the book .NET Domain-Driven Design with C#: Problem-Design-Solution


A made-up example that seems promising but might have died: http://www.codeplex.com/domaindrivendesign

I'm afraid that http://www.codeplex.com/domaindrivendesign has indeed died, but if anyone is interested in contributing feel free to contact me.

Overall I would recommend against relying too much on examples of DDD, at best examples can show the results of the domain modelling and/or one approach for implementing the patterns. I would thus recommend reading the book and then asking questions at the forum.

http://kigg.codeplex.com/ is a good example for me.

I know it is not C#, but this is a java meta-framework that follows a domain driven approach: I don't know much about it but I'm willing to study it in the near future: Roma Framework

http://sellandbuy.codeplex.com/

another project DDD

A good read is Jimmi Nilssons book (and blog for that matter) Applying domain driven design

It's a mixture of Evans and Fowlers books (Domain-Driven Design - Evans), and (Patterns of Enterprise Application Architecture - Fowler)

I haven't used any myself, but there are some tools mentioned on the DDD Wikipedia page. Most of them seem to be implemented in Java though.

http://en.wikipedia.org/wiki/Domain-driven_design#Software_tools_to_support_domain-driven_design

Ok, I found this, but it's Java not C#:
http://timeandmoney.domainlanguage.com/

Code Camp Server, Jeffrey Palermo's sample code for the book ASP.NET MVC in Action is open source and uses DDD.

(Same as my answer in Good Domain Driven Design samples)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top