Home > Mobile >  language in microservice RESt API design
language in microservice RESt API design

Time:06-28

So im in the middle of breaking up a monolith, and i have decomposed it into services. However i came across something interesting.

We have a scenario where a customer is referred to as "customer", "client", "prospect"

And they all mean the same thing.

Now when designing the endpoints for the services... i can stick to each service having and using these different terms... but it doesnt feel right.

Should we align to using the same term, since they mean the same thing?

CodePudding user response:

One principles of DDD is ubiquitous language. You should ask your business experts to select one, which has less probability of being misunderstood by every stakeholder, and replace all others with that one.

CodePudding user response:

It is likely that this is a case of different bounded contexts, where the same thing might be referred to using different terms, or the other way around, where the same word might have different meanings. It is important to understand and map these contexts, so that ambiguities can be minimized and interrelationships between these bounded contexts be made explicit. Breaking down a monolith is a typical case where these kinds of issues come to light, where multiple bounded contexts have been forced to live together and as such have gotten entangled - something that should be sorted out when breaking out separate services to ensure good decoupling. That being said, it might also just be that different terms have been used at random. Either way you should strive for a ubiquitous language; agreeing with domain experts around unambiguous and consistent terminology and then sticking to it everywhere; in code, documentation, communication, you name it.

  • Related