As we already know, a domain is a very important subject in Domain Driven Design.
To understand what a domain is, we need to talk about some specific topics to, clarify the meaning of this subject.
Before starting to describe those topics, I would like to citate a phrase, spoken by Eric Evans.
“Fundamentally, DDD is the principle that we should be focusing in the deep issues of the domain our users are engaged in…”
The following topics, should be remembered when we talk about Domains, which are:
• A domain is a sphere of knowledge.
• Domain which is the totality of the Company’s Domain.
• Usually comprehended as the main business of a company.
• Domain that refers to an area, sector, or even a process of the company.
• Domain that serves as support for the business.
• A domain is not the same as a model.
Having those ideas in mind, we can understand that, the Domain, is inside the space of the problem and not, in the space of the solution, for this reason, we really need help from the domain experts, to understand the business, the rules, and the important things that, we have to create a model, a solution in a software that will help them.
If we try to describe the domain, in the world of software architecture or, software development, we can refer to the domain as a business or an idea, that we are trying to be modelling.
Domains are usually not simple, they are commonly large and complex to understand.
Because of that complexity, it is extremely important to know, how to distiller the domain.
Let us think about a Domain for an Investment Bank company.
Exists various domains inside an Investment Bank, it also happens in all huge companies.
For this reason, it is extremely important to distiller the domain.
Distillation is the process of identifying the domain, decoupling, isolating, clarifying and making it explicit.
As Eric Evans wrote “Distillation is the process of separating the components of a mixture to extract the essence in a form that makes it more valuable and useful.”
When you start to think about your model, if you just model everything, inside a one and just one domain, you will fail, for sure.
We need to understand the domain and separate, break, or distiller it in small pieces named SubDomains. Let us look again for the same Investment Bank domain, but now, let us separate it in small SubDomains.
If we just started separating the big domain in smaller subdomains, it will become easier to model, understand and keep going more deeply in the modeling.
Inside each kind of subdomain, we will find the specific domain experts, we need to talk with them for, comprehend better this subdomain. Probably using some techniques such as Event Storming for example.
To recap, for now, we are talking about the space of the problem and not yet the space of the solution.
Beyond that, we are seeing in a top-level view, a specific domain. Each subdomain described here could be, or not, distilled in other subdomains, it will depend on, the complexity that exists inside each one of them.
Distilling a domain is extremely important to a good strategical design, when doing that, we start to distinguish what is a Core Domain from what is just a Generic Domain for example and, reducing them to manageable sizes.
Thanks for reading, I hope you have enjoyed.