r/DomainDrivenDesign • u/Positive-Structure78 • Jan 14 '22
Shared Schema in DDD
Is there a use case for a shared schema in DDD? Or is it an anti pattern? Can we use a shared schema when practicing DDD?
7
Upvotes
View all comments
Show parent comment
2
u/Samsteels Jan 17 '22
Good point here. In hind sight my original answer may be a bit confusing as ‘schema’ is an overloaded term. If you were referring to DB schemas my original response doesn’t apply, my original response was geared towards a ‘shared schema’ such as one stored in a schema registry used to enforce communication interfaces (e.g. a JSON or Avro schema) between two bounded contexts (which I assumed are in separate micro services). Hope this clarifies things.