In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces what domain-driven design is like, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Domain-driven design
Domain-driven design is a development concept defined by Eric Evans.
Complexity in software: contains "it does work to some extent, but it doesn't explain how to run the code." Software has become complex and difficult to manage, but one of the main reasons is that domain complexity is mixed with technical complexity.
The cause of complex problem domain (mudball mode)
Software complexity: occasional technical complexity and domain logic complexity.
1. Code not created in a common language: a lack of emphasis on common language and problem domain knowledge can make the code base available but unable to reveal business purposes, which makes the code base difficult to read and maintain. because the translation between the analytical model and the code model will be costly and error-prone. Note: analytical model: analytical model is used to describe the logical design and structure of a software application. It can be represented by diagrams or by using a modeling language such as UML. It is a form of software that allows non-technical people to conceptualize in order to understand how the software is constructed.
two。 Lack of organizational structure: the initial embodiment of a system is rapid production and usually can achieve comprehensive success, but due to the lack of attention to application design based on the problem domain model, subsequent functional extensions become tricky.
The harm of mud ball mode
1. The mudball model will stifle development: the development team will constantly complain that it is difficult to work in such a mess. The growth level of the development speed can not meet the business needs.
two。 Lack of focus on the problem domain: software projects fail when the business area being addressed is not fully understood. Coding should not be the difficult part, but maintaining a useful software model that satisfies business use cases is the difficulty.
What is the problem domain?
The problem domain relates to the subject area where you are currently building the software. DDD emphasizes the need to focus on the domain above everything else when working to create software for large and complex business systems.
How domain-driven design patterns manage complexity
DDD can simultaneously address the challenges of understanding problem domains and creating maintainable solutions that help solve their inherent problems.
The strategic model of DDD
1. Refining the problem domain has revealed what is important.
Development teams and domain experts use analytical patterns and knowledge processing to refine large problem domains into more managed subdomains. The core area is the driving force behind the product of the development process; it is the root cause of constructing the product.
Exploring core areas helps teams understand why they make software and what it means for business success. The identification of business goals will enable the development team to identify and devote energy to important parts of the system. As the business develops, the software must develop accordingly; it needs to be modifiable, and investing in code quality in key areas of the application will help the application keep up with the changing pace of the business.
two。 Create a model to solve domain problems in the solution space, a software model is built for each sub-domain to deal with domain problems and align the software with the business. This model is not a real-world model, but rather an abstraction built to meet the requirements of business use cases, while still maintaining the rules and logic of the business domain.
3. Use common language to open modeling collaborative model using common language build (UML) to connect software model and conceptual analysis model together quickly and efficiently. Coding terms are mapped to the common language, and concepts hidden in business analysis are fed back into the code. This is the key to the gradual development of the model in collaboration between domain experts and development teams.
4. The model is isolated from ambiguity and damage in a bounded context, defining the applicability of the model and ensuring that its integrity is preserved. Bounded context is used to form a protective boundary around the model, which is achieved by allowing different models of the overall solution to evolve within a well-defined business context. in this way, there will be no other negative knock-on effects on the system.
The model is isolated from the infrastructure code to avoid the occasional complexity of the fusion of technical and business concepts. Bounded context can also prevent model integrity from being compromised by isolating model integrity from third-party code.
5. Understand the relationship between contexts
DDD understands the need to ensure that teams and businesses are well aware of how independent models and contexts work together to solve domain problems that span subdomains.
The tactical mode of DDD
DDD's tactical pattern is a collection of patterns that help create effective models for complex bounded contexts. (enterprise application architecture pattern, design pattern)
Practice and principles of domain-driven design in problem space and solution space
Focus on core areas
Learning through collaboration
Create a model through exploration and experiment
Communication
Understand the applicability of the model
Let the model develop continuously
Common misunderstandings of domain-driven design
Tactical patterns are the key to DDD it is much easier for developers to find DDD tactical patterns implemented in code than to discover conversations between business users and teams in areas that developers do not care about or understand. This is why DDD can be mistaken for a schema language made up of entities, value objects, and repositories.
DDD is a set of frameworks
DDD is a silver bullet.
About how the domain-driven design is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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: 265
*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.