1

Suppose an organization is developing an enterprise assistance and management platform with instant messaging, video conferencing, file cloud, online documentation, process approval, and more. The implementation of each function requires a complex technology, so how do you identify the subdomains of the platform? Or to put it more directly: Is a business function to be developed a new subdomain? Or is a business function a new business domain that can be subdivided into many subdomains?

Thanks to Ewan and Doc Brown for their patience and tolerance of my ignorance. I think I can finally ask the question that has been bothering me: "What are the criteria to define a subdomain? Can subdomains be divided into subdomains of subdomains? At what point does a subdomain become undivisible?"Some people think that subdomains are integral parts of the business areas that collectively form a company, and that each subdomain is handled by a separate department. Others argue that subdomains are relative. Subdomains can be part of an enterprise's business domain, or they can be as small as part of a department's business (for example, a Marketing Department might have its own subdomain).

1
  • This format of this site works best when questions are not a moving target. If you have a new question, better ask it as a new post, maybe with a reference to this one. However, this specific question ("How to split a domain into subdomains with DDD?") is the type of post which has always a certain risk of getting closed ("Needs more focus" ).
    – Doc Brown
    Commented Jan 22 at 6:08

3 Answers 3

2

DDD tries to get programmers to make the program match the business structure/thinking. In the business, a sub domain is part of the business which is divided off from the other parts, such as a "department". It's probably got its own "head of" manager and makes decisions on its internal processes without worrying about what the rest of the business thinks.

As such we are talking sizable chunks of process, employing at least several people. It's unlikely that a single new feature will require a whole new department in a business. But not impossible.

A smaller business might not be big enough to have departments, but still might have the same processes, which would be their own departments in a larger business.

The key thing I think would be to ask if the business thinks of the new process/feature/system as separate and by how much.

8
  • Yes, I'm talking about a complex situation in a company of a certain size. As the example I talked about in the question, maybe every function could have been a complete software independently, but the enterprise prefers to integrate into a product to form its own barriers, hoping that users can solve all needs with the next software. In such software subdomains and functional blocks seem to become one-to-one relationships?
    – Ares
    Commented Jan 21 at 12:15
  • 1
    I think the trouble is if you just say "function", "software" and "product" etc we are really in the dark about what exactly that means. it could be "add a multiply button to the calculator app" or "make facebook only better!".
    – Ewan
    Commented Jan 21 at 14:49
  • 1
    @Ares: you can call a functional blocks (or business function) whatever you like to, this is a generic term which can be used at different level of abstractions, and it is up to the one who speaks of "functional blocks" to define what is meant. So yes, one can use the term "functional block" for a subdomain. And no, that's not necessarily a one-to-one relationship, one might also call single functionalities within a subdomain "functional blocks"
    – Doc Brown
    Commented Jan 21 at 14:50
  • @Doc Brown: I seem to know what you mean. First of all, let me make it clear that the functional blocks I mentioned in the question specifically refer to "large" modules such as "workflow approval" and "file cloud disk", rather than small functions such as click and return. This "big" module has complete logical rules and processes. If it wants to, it can even stand on its own as a piece of software, so it can form a one-to-one relationship with subdomains.
    – Ares
    Commented Jan 21 at 15:51
  • 1
    I don't think those type of things are what DDD means by subdomain. Your company probably has an Accounts/Billing Dept which handles user accounts and backend stuff. That is a subdomain. You might have a marketing Dept which pulls reports of user activity etc, thats a subdomain. You MIGHT have a whole dept just for the food delivery side of the app, that would make it a subdomain. But I imagine many of the modules in the apps are grouped up and handled by the same part of the business, say "Ticket Sales Dept" and wouldnt be individual sub domains
    – Ewan
    Commented Jan 21 at 20:56
2

In DDD, the term "business function" doesn't have a specific meaning on its own. I looked it up in Evan's book, it does not appear in the index.

Personally, I am used to use the term for certain, isolated functionalities or features within the domain (or maybe within subdomains), hence on a different level of abstraction than the term "subdomain". For me, a business function is something which can be discovered througout the analysis of a (sub) domain. You might describe it in terms of entities, aggregates, services, and their behaviour, as well as with use cases.

Of course, single business functions can turn out to become larger than expected over time. This can happen during analysis, or during the evolution of the system. Then it may be justified to model a whole subdomain for something which was formerly called just a function or feature.

Since there is no universal authority on this, feel free to use "business function" on the level of abstraction which suits your needs best. Just make sure you explain to your audience what you mean by it.

For example, your question is an example for doing this wrong (please don't take this as personal critics, this is just factual). It gives a few examples ("instant messaging, video conferencing, file cloud,...), but the phrasing leaves it open to the imagination of the reader if that is what is meant by "business function".

so how do you identify the subdomains of the platform?

That question is mostly unrelated to the question about the term business function. It is a pretty broad question and not easily answerable here in a few paragraphs. Evan's DDD book contains 3 chapters about it (chapters 15-17, "Distillation", "Large-Scale Structure", and "Bringing the Strategy together).

For the example of your enterprise platform, however, I think each of the topics is so complex it might require a team on its own, and each of the teams may use a different methodology to develop their subsystem. Or, even more likely, you will not develop these components all newly from the ground. Instead, the task will be to integrate certain existing standard software components into the system. So before going into the technical modeling, one has probably start with creating the organizational structure first and make some decisions what not to develop, but to buy instead.

8
  • I couldn't agree with you more. The reason why I raise this question is because my previous working mode is to propose a new function first, and then analyze the logic and flow of this function to write code, so it is difficult for me to immediately use domain analysis thinking to think about software design. I know many concepts of domain-driven design, but once I combine real software products, especially software with complex functions like the one in the problem, it is difficult for me to bring in domain-driven design thinking.
    – Ares
    Commented Jan 21 at 10:18
  • @Ares: "propose a new function first, and then analyze the logic and flow of this function to write code" - what makes you think DDD cannot be used exactly like that?
    – Doc Brown
    Commented Jan 21 at 10:25
  • it is difficult for me to distinguish between splitting by subdomain and splitting by business capability, and it is difficult to distinguish between software functionality and subdomain in real life. I can understand the realization of an online mall in the book, which divides the entire mall into order subdomain, inventory subdomain, commodity subdomain and so on. But once I switch to a new software product, such as the software in question, I don't know what to do. I think this may be caused by my lack of in-depth understanding of the concept of domain-driven design.
    – Ares
    Commented Jan 21 at 11:05
  • My mind was confused because I hadn't practiced domain-driven design much. As a developer, I can't help but think that a functional block is a subdomain, because just as a software product is made up of several functional blocks, an enterprise business domain is made up of several subdomains. I always equate the relationship between the two. Finally, thank you for your instruction
    – Ares
    Commented Jan 21 at 11:12
  • 1
    @Ares: "But once I switch to a new software product, such as the software in question, I don't know what to do." That is how everyone starts out. This isn't a case of "I should be someone who already knows what to do with DDD". This is a case of "what techniques can I apply to further my understanding of this new product, so that I can then apply DDD to that understanding that I've built up". DDD does not start applying from the part where you're not even familiar with the new application you're building. It starts applying when you understand the context and wish to model it.
    – Flater
    Commented Jan 22 at 0:36
2

It is unclear what you are asking. On the face of it, you're asking how the application logic should be structured based on the tech stacks you're working with, which (if correct) is decidedly not how you should do that.

The issue here is that you seem to be hinging your understanding of DDD based on the semantics of the explanation you've been given, and this is not going to work out well for you if you approach it like that. Instead, it's much more important to understand the goal of DDD and what its domains represent, because you (as the developer) are the one who needs to be capable of assessing your requirements and what domain contexts best represent them.

It also seems that you are expecting DDD to do your analysis for you, based on this comment you made:

But once I switch to a new software product, such as the software in question, I don't know what to do.

That is how everyone starts out. This isn't a case of "I should be someone who already knows what to do with DDD". This is a case of "what techniques can I apply to further my understanding of this new product, so that I can then apply DDD to that understanding that I've built up".

DDD isn't a flowchart approach to understanding your requirements. It doesn't describe exactly how to technically understand every possible requirement, context or scenario. DDD is a guideline on how to model something after you've analyzed and understood it.

Your current question, as posted, does not indicate that you understand these prerequisites, nor do you explain them in the question so that we may provide an answer on the DDD-part of the question.

I think you're relying on DDD too soon in your process, which is hurting you because you don't understand your context/requirements and are somehow looking at DDD to help you with that (which it doesnt).

I strongly suggest you dig deeper into DDD training (though whatever media/education you prefer) and get a better understand of exactly what it is and what specific part of the solution it provides before you start using it, because misuse will cause you lots of grief in the long haul.

1
  • 1
    Thank you for your correction. The problem you said is indeed the problem I have.
    – Ares
    Commented Jan 22 at 2:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.