Skip to content

Domain driven design #2

Answered by benbjohnson
svetli-n asked this question in Q&A
Jan 12, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @svetli-n! I've seen some people advocate for DDD in Go but I personally find it difficult to implement well. The implementations I've seen separate domains into different packages and duplicate domain types between them (although only keep the fields that are relevant to that domain).

I think it could be useful to separate applications into subdomains that align to the application architecture if you're using something like microservices. In that case, each microservice has its own separate package tree and possible share some common domain types in a root package.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@namreg
Comment options

@benbjohnson
Comment options

Answer selected by benbjohnson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants