当前位置:网站首页>The purpose of DDD to divide domains, sub domains, core domains, and support domains
The purpose of DDD to divide domains, sub domains, core domains, and support domains
2022-07-27 22:21:00 【Pangolin without armor】
A term is used to explain
stay 《DDD The reasons for the rise and the relationship with micro Services 》 There was an example of studying peach trees , If you want to study peach trees , Divide the peach tree into roots according to its organs 、 stem 、 leaf 、 flowers 、 Fruit 、 seeds , Each of these organs can be regarded as a research field , And there are more specific subdivisions in the field , Divided into subdomains 、 Core domain 、 Common domain 、 Support domain, etc , Let's review the peach tree example

Look at the picture above , If studying peach trees is our business , So how to study peach trees more quickly and effectively ? According to memories , This is how junior high school textbooks are studied :
First step : Identify the subjects of the study , That is, the research field , Here is a peach tree .
The second step : According to some dimensions of the research object , To further split it , Like splitting into organs , And organs can be divided into vegetative organs , reproduction organs , The vegetative organs include roots 、 stem 、 leaf , The reproductive organs include flowers 、 Fruit 、 seeds , So these are the subdomains we want to study .
The third step : Now we can divide the most sub domains , Find the core domain , Common domain , Support domain , As for why it's so divided , I'll explain later , When we find the core domain , And then each sub domain is further divided , Divide into organizations , For example, divide into protection groups , Nutritive tissue , Groom the organization , This can also be understood as the process of dividing the domain into sub domains .
Step four : To further divide the organization , It can be divided into cells , For example, root hair cells 、 Ductal cells and so on
Is it necessary for us to continue to split cells ? It depends on the business we study , For example, before the light microscope , When it comes to cells, it's over , Specific to other businesses , At a certain stage of research, there is no need to continue to split , And this is the lowest level area , It's usually what we call entities , polymerization 、 Aggregate root 、 Entities, value objects and so on will be further understood later .

Let's summarize the concepts of the nouns mentioned above :
field : It's often a part of the business , For example, the sales part of e-commerce 、 Logistics part 、 Supply chain, etc , These are all fields for e-commerce ( modular ), The main function of domain is to drive scope , DDD Will limit the scope of the problem to a specific boundary , Building domain models within this boundary , Then the domain model is implemented with code , Solve the corresponding business problems . in short ,DDD The domain of business problem is the domain of business problem to be solved within this boundary .
Subdomain : A relative concept , We can further divide the fields , This is the subdomain , You can even continue to divide sub domains to form Subdomain ( Still called Subdomain ), It's like when we study plants , If the object of study is peach trees , So fruits, roots and leaves are fields , But if it's not just about fruits , We have to study tissues and even cells , So what we are studying is the subdomain of fruit 、 Subdomains of organizations .
Core domain : The most critical part of all areas , What does that mean , It's the core part , For business , The core domain is the fundamental competitiveness of enterprises , It's also the most important part of making profits , For example, there are so many fields in e-commerce , What's the most important ? It's the sales system , No matter you are 2B still 2C, still PDD , These core modules are core domains .
Common domain : In addition to the core domain , Some areas that need to be done by ourselves , For example, authentication 、 Log etc. , Features are parts that can be shared by multiple domains .
Support domain : The least focused area in the business analysis phase of the system , That is, non core domain, non general domain , For example, payment in e-commerce 、 logistics , Just to support the operation of the business , You can even buy other people's services , This kind of domain is the support domain .
It should be noted that , These terms may not be used in the actual design and development of microservices , But it helps to understand DDD The core design ideas and concepts of , And these ideas and ideas in the actual IT Strategic design, business modeling and microservice design can be used for reference .
Why divide the core domain 、 Common domain 、 Support domain ?
You can know from the above , The sub domain that determines the core competitiveness of products and companies is the core domain , It is the main factor of business success and the core competitiveness of the company . There's not much personalized appeal , A common functional subdomain used by multiple subdomains at the same time is a common domain . There is also a functional subdomain that is required , But it does not include the function of determining the core competitiveness of products and companies , It also does not contain sub domains of general functions , It's the support domain .
Compared with these three kinds of subdomains , The core domain is the most important , When we talk about the purpose, we will take the core domain as an example . If the common domain and support domain correspond to the enterprise system , For example , Common domain is the common system you need to use , For example, certification 、 Permissions, etc. , This kind of application is easy to buy , There is no limitation of enterprise characteristics , You don't need to do much customization . The supporting domain has the characteristics of enterprise , But it's not universal , For example, the data dictionary of data code class and other systems .
So why divide these new nouns ? Think of a question first , For peach trees , root 、 stem 、 leaf 、 flowers 、 Fruit 、 Which of the six seed domains is the core domain ?
Is there a different understanding ? Some people say seeds , Some people say it's roots , Some say it's a leaf , Some people say it's stems and so on , Why does this happen ?
Because everyone's angle is different , If you're a fruit farmer , So the fruit is the core domain , Most of your operations should be around increasing fruit yield , If you are a scenic spot Administrator , So Fangfei, April peach blossom is your focus , If you are a staff member of the forest farm , So tree trunks should be your focus , You see , For subdomains of the same domain , Everyone has a different understanding , Then we need to determine the core domain through discussion , Make sure everyone agrees , For actual business development , There are many people involved , There are business aspects , There are architects , There are back-end developers , Marketing and so on , We have to identify our core domain from the very beginning , Apart from unifying our understanding, what are the advantages ?
For an enterprise , Budget and time are limited , It means that time, energy and even money should be spent in the core as much as possible . It's like e-commerce , There are so many e-commerce enterprises , Each core domain is different , The market results are also very different , Then the company's strategic focus and business model should find the core domain , And focus on the core domain .
in general , Core domain 、 The main goals of the support domain and the common domain are : Through domain division , Distinguish the different functions of different subdomains in the company
Attributes and importance , Thus, the company can adopt different resource investment and construction strategies for different sub domains , Their attention will also be different .
More recommendations
“ framework ” What do you mean
How to test the performance of microservices ?
DDD The reasons for the rise and the relationship with micro Services
Centralized architecture and distributed architecture , How much do you know ?
Overview of microservice Architecture
边栏推荐
- Are Transformers Effective for Time Series Forecasting?|填坑
- [binary tree] count the number of good nodes in the binary tree
- 一种比读写锁更快的锁,还不赶紧认识一下
- More than 100 lines should be split into functions
- electromagnetic relay
- Credit default prediction based on simplified scorecard, smote sampling and random forest
- What is eplato cast by Plato farm on elephant swap? Why is there a high premium?
- How to learn object Defineproperty | an article takes you to quickly learn
- 直播软件app开发,uniapp scroll-view隐藏滚动条
- Cloud native microservices Chapter 3: haproxy+kept
猜你喜欢

How to quickly pass the probation period for newly trained intermediate test engineers

基于简化的评分卡、Smote采样和随机森林的信贷违约预测

只会Excel想做图表可视化,让数据动起来?可以,快来围观啦(附大量模板下载)

软件测试的就业前景到底怎么样?

Chapter 3 business function development (choose to export market activities, Apache POI)

Station B collapsed. What did the developer responsible for the repair do that night?

Regular expression exercise

Reentranlock and source code analysis (learn ideas and click the source code step by step)

Reed relay

Lvs+kept highly available cluster
随机推荐
[question 21] idiom Solitaire (Beijing Institute of Technology / Beijing University of Technology / programming methods and practice / primary school)
Inertial navigation principle (VII) -imu error classification (II) -allan variance analysis method +imu test + calibration introduction
Station B collapsed. If we were the developer responsible for the repair that night
What is modcount in the source code? What's the effect
Live video source code, uni app to achieve advertising scroll bar
JVM memory model interview summary
时间继电器
A lock faster than read-write lock. Don't get to know it quickly
How long will it take to learn the four redis cluster solutions? I'll finish it for you in one breath
【sql】SQL优化
leetcode15--三数之和
Leetcode-538- convert binary search tree to cumulative tree
8000字讲透OBSA原理与应用实践
项目分析(哪些是it培训给不了)
JVM garbage collection garbage collector and common combination parameters
Cocoapods reload
How to buy stocks on mobile phones? Is it safe to open an account
8000 word explanation of OBSA principle and application practice
Wechat applet live broadcast plug-in -- get temporary files (background integrated applet live broadcast)
An2021 software installation and basic operation (new file / export)