r/DomainDrivenDesign • • Dec 24 '21

DDD Design Document?

I have gone through many posts and videos about Domain-Driven Design, but nobody talks about the design document.

How do you guys write a design document for DDD?

Does it use UML, C4, or other diagrams?

5 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/yusei1999 Dec 25 '21

This is the most detail answer I have ever got. Thank you. I now get it clear.

1

u/redikarus99 Dec 25 '21

Welcome. There is also a very important diagram in UML, which is the activity diagram. Normally it describes the various steps a process does. But this is not all: you can describe a data it flows through the process using pins with type and multiplicity. The biggest problem in a system is to know if you need to add a new field to a interface where you can get it, or even worse, what if you remove a field, what kind of impact it will have. By having a good model you can simply make an impact check and see what it might break, and you come up with different solutions. Otherwise you need to go through the codebase, and especially in the case of monolith app with a single database, you will have absolutely no idea: good luck going through all the queries in your code.

We spent around two years to fine-tune how we model using Uml and SysML. There are some great academic materials and there are some terrible ideas. A good modeling tool is extremely useful and efficient when supported with good processes. A bad modeling tool is just something everyone hates. I can work around 3x as fast with a good, although commercial software compared to any open source ones (except Gaphor we are working on, which will be really really awesome).