Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I find some good examples for DDD? [closed]

I'm learning about Domain Driven Design, however there are some practical issues that are confusing to me that I think seeing some good samples might clear up.

Does anyone know of some good working code samples that do a good job of modelling basic DDD concepts?

Particularly interested in

  • An illustrative Domain Model
  • Repositories
  • Use of Domain/Application Services
  • Value Objects
  • Aggregate Roots
like image 377
jlembke Avatar asked Feb 12 '09 05:02

jlembke


People also ask

What is DDD example?

An aggregate is a domain-driven design pattern. It's a cluster of domain objects (e.g. entity, value object), treated as one single unit. A car is a good example. It consists of wheels, lights and an engine.

Is DDD hexagonal?

Second, through tactical design, related with which technical resources to use on the building of the software. Normally, hexagonal architecture is used with DDD, but other architectures can be used instead.

Which approach we can use for Domain-Driven Design?

Domain-Driven Design is a concept introduced by a programmer Eric Evans in 2004 in his book Domain-Driven Design: Tackling Complexity in Heart of Software. It is an approach for architecting software design by looking at software in top-down approach.

What is DDD Quora?

In other words, it is the process of testing the code before its accrual writing. If the code passes the test, then we can proceed to its refactoring. DDD (Domain Driven Design) is the way of creating complex systems by developing the separate parts of it.


1 Answers

The difficulty with DDD samples is that they're often very domain specific and the technical implementation of the resulting system doesn't always show the design decisions and transitions that were made in modelling the domain, which is really at the core of DDD. DDD is much more about the process than it is the code. (as some say, the best DDD sample is the book itself!)

That said, a well commented sample app should at least reveal some of these decisions and give you some direction in terms of matching up your domain model with the technical patterns used to implement it.

You haven't specified which language you're using, but I'll give you a few in a few different languages:

DDDSample - a Java sample that reflects the examples Eric Evans talks about in his book. This is well commented and shows a number of different methods of solving various problems with separate bounded contexts (ie, the presentation layer). It's being actively worked on, so check it regularly for updates.

dddps - Tim McCarthy's sample C# app for his book, .NET Domain-Driven Design with C#

S#arp Architecture - a pragmatic C# example, not as "pure" a DDD approach perhaps due to its lack of a real domain problem, but still a nice clean approach.

With all of these sample apps, it's probably best to check out the latest trunk versions from SVN/whatever to really get an idea of the thinking and technology patterns as they should be updated regularly.

like image 95
Michael Hart Avatar answered Oct 19 '22 09:10

Michael Hart



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!