In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "what is domain-driven design". In daily operation, I believe that many people have doubts about what domain-driven design is. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is domain-driven design"! Next, please follow the editor to study!
§0x01 what is domain-driven design
Thinking: to understand domain domain, you should start with the business.
A word often heard in software design is: business. In daily development, some colleagues will say, be familiar with the business; xxx is not familiar with the business. What is the business?
Business should be a core activity and process unique to a company or a product. As far as cloud computing is concerned, it provides pooled computing, storage and network capabilities. What is obvious is the lifecycle management of virtual machines.
Domain refers to the part of knowledge and process that is strongly related to the business.
The core idea of domain-driven is to take business as the core. Dock the application layer (Application) up and the IO layer (Repositroy) down. Compared with the traditional hierarchical model, its granularity is finer and more demanding. The traditional hierarchical model can work normally in small software scenarios, but when most people implement it, there are often two problems.
The logic of the business layer goes to the application layer, which is very bloated.
The logic of the business layer runs to the driver layer (IO layer), which leads to the over-dependence of the product on the driver layer, which has a disastrous impact on the subsequent refactoring and maintenance.
§the significance of 0x02 Model 2.1Model
The model, as a form of knowledge, selectively simplifies and intentionally structures the knowledge.
The core of the domain is the model. The meaning of the model is defined in this paper. This is the same way you deal with the problem, ignoring the contradiction and paying attention to the principal contradiction. The most talked about models are physical models and mathematical models. For example, "particle" does not exist in the real world, but such a model is very meaningful for explaining physical phenomena and analyzing the force acting on an object. When there is no particle, you exert a force on an object, and you should be concerned about the position of the force. Different positions of action in the real world lead to different results.
A flat cube exerts a great force on the side near the bottom, and the cube flips back and forth because of the moment. It's not described in Newton's second law, it accelerates straight lines.
Here is another abstraction. Abstraction is the means of modeling. By abandoning some unnecessary details and getting something that reflects our concerns, this thing is the model.
2.2 the significance of the model to the domain
The model is the summary of design and implementation.
The model directly affects the design.
Model is the language of communication
Models are condensed knowledge.
Think about:
The model affects the completeness of the design model is the final measure of whether the design meets the requirements. The transfer of knowledge should be: demand changes affect the model, model changes affect the design. Technical experts usually don't look directly at the code to determine if there is something wrong with your implementation, but if a model is given, the expert can quickly see if there is something wrong with your design.
The model is the communication language model is the basis of the design code communication, can limit the problem to a familiar scope, and improve the efficiency of communication.
The fact that the model is condensed knowledge is a bit repetitive to the description of 2. It feels like it can be put together.
Add: the model can help new members to quickly understand the design. See that many open source projects will describe the design in the document, but many projects do not have a suitable model definition, which makes it difficult to understand and get started.
2.3 Core of softwar
The core of the software is to provide users with the ability to solve domain-related problems.
In vernacular terms, it is to meet the needs.
In this part, the author puts forward a common problem: most coders are not interested in modeling skills and business knowledge, which is precisely the core technical requirement to achieve user requirements. The further reason is that "technicians like more direct problems that can improve their technical level."
This reason has two meanings. One is a common psychological phenomenon, people like things that can be seen directly; for example, when they are young, they like to talk about love, but in the end, when facing reality, money is important. Because love is abstract, money is concrete and visible. For such an abstract thing as modeling, without looking up a BUG at all, learning a new language is real.
The other is when you want to change jobs. You say you are good at domain modeling, and maybe the interviewer doesn't have much accumulation in this part and can't judge your technical level; even ta happens to know it, and it's hard to test how strong your field is during the interview time. On the contrary, it is easier to judge your level by asking about the features of the language or the basics related to the operating system. In other words, there is no market for abstract things.
Most chaotic areas of software are actually a fun technical challenge. Creating an easy-to-understand model that overcomes these complexities brings a great sense of accomplishment.
At this point, the study on "what is domain-driven design" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.