Domain-driven design
Domain-driven design (DDD) is a software design approach that focuses on modeling software to match a domain according to input from that domain's experts. DDD is against the idea of having a single unified model; instead it divides a large system into bounded contexts, each of which have their own model. Under domain-driven design, the structure and language of software code (class names, class methods, class variables) should match the business domain. For example: if software processes loan applications, it might have classes like "loan application", "customers", and methods such as "accept offer" and "withdraw". Domain-driven design is predicated on the following goals: * placing the... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
Domain-driven design (DDD) is a software design approach that focuses on modeling software to match a domain according to input from that domain's experts. DDD is against the idea of having a single unified model; instead it divides a large system into bounded contexts, each of which have their own model. Under domain-driven design, the structure and language of software code (class names, class methods, class variables) should match the business domain. For example: if software processes loan applications, it might have classes like "loan application", "customers", and methods such as "accept offer" and "withdraw". Domain-driven design is predicated on the following goals: placing the project's primary focus on the core domain and domain logic layer; basing complex designs on a model of the domain; initiating a creative collaboration between technical and domain experts to iteratively refine a conceptual model that addresses particular domain problems. Critics of domain-driven design argue that developers must typically implement a great deal of isolation and encapsulation to maintain the model as a pure and helpful construct. While domain-driven design provides benefits such as maintainability, Microsoft recommends it only for complex domains where the model provides clear benefits in formulating a common understanding of the domain. The term was coined by Eric Evans in his book of the same name published in 2003. ==Overview== Domain-driven design articulates a number of high-level concepts and practices. Of primary importance is a domain of the software, the subject area to which the user applies a program. Software's developers build a domain model: a system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain. These aspects of domain-driven design aim to foster a common language shared by domain experts, users, and developers—the ubiquitous language. The ubiquitous language is used in the domain model and for describing system requirements. Ubiquitous language is one of the pillars of DDD together with strategic design and tactical design. In domain-driven design, the domain layer is one of the common layers in an object-oriented multilayered architecture. ==Event types== There are different types of events in DDD, and opinions on their classification may vary. According to Yan Cui, there are two key categories of events: ==Context Mapping patterns== Context Mapping identifies and defines the boundaries of different domains or subdomains within a larger system. It helps visualize how these contexts interact and relate to each other. Below are some patterns, according to Eric Evans: Partnership: "forge a partnership between the teams in charge of the two contexts. Institute a process for coordinated planning of development and joint management of integration", when "teams in two contexts will succeed or fail together" Shared Kernel: "Designate with an explicit boundary some subset of the domain model that the teams agree to share. Keep this kernel small." Customer/Supplier Development: "Establish a clear customer/supplier relationship between the two teams", when "two teams are in [a] upstream-downstream relationship" Conformist: "Eliminate the complexity of translation [...] choosing conformity enormously simplifies integration", when a custom interface for a downstream subsystem isn't likely to happen Anticorruption Layer: "create an isolating layer to provide your system with functionality of the upstream system in terms of your own domain model" Open-host Service: "a protocol that gives access to your subsystem as a set of services", in case it's necessary to integrate one subsystem with many others, making custom translations between subsystems infeasible Published Language: "a well-‐documented shared language that can express the necessary domain information as a common medium of communication", e.g. data interchange standards in various industries Separate Ways: "a bounded context [with] no connection to the others at all, allowing developers to find simple, specialized solutions within this small scope" Big Ball of Mud: "a boundary around the entire mess" when there are no real boundaries to be found when surveying an existing system ==Relationship to other ideas== Although domain-driven design is not inherently tied to object-oriented approaches, in practice, it exploits the advantages of such techniques. These include entities/aggregate roots as receivers of commands/method invocations, the encapsulation of state within foremost aggregate roots, and on a higher architectural level, bounded contexts. As a result, domain-driven design is often associated with Plain Old Java Objects and Plain Old CLR Objects, which are technical implementation details, specific to Java and the .NET Framework respectively. These terms reflect a growing view that domain objects should be defined purely by the business behavior of the domain, rather than by a more specific technology framework. Similarly, the naked objects pattern holds that the user interface can simply be a reflection of a good enough domain model. Requiring the user interface to be a direct reflection of the domain model will force the design of a better domain model. Domain-driven design has influenced other approaches to software development. Domain-specific modeling, for instance, is domain-driven design applied with domain-specific languages. Domain-driven design does not specifically require the use of a domain-specific language, though it could be used to help define a domain-specific language and support domain-specific multimodeling. In turn, aspect-oriented programming makes it easy to factor out technical concerns (such as security, transaction management, logging) from a domain model, letting them focus purely on the business logic. ==See also== Data mesh, a domain-oriented data architecture Event storming Knowledge representation Ontology (information science) Semantic analysis (knowledge representation) Semantic networks Semantics C4 model Strongly typed identifier Integrated design Systems science ==References== ==External links== DDD Crew on GitHub: Bounded Context Canvas, Aggregate Canvas, Modeling Process and more repositories Implementing Aggregate root in C# language Context Mapper: A Modeling Framework for Strategic Domain-driven Design (Tool, Tutorials, DDD Modeling Examples) Strategic DDC Activity in Design Practice Repository (DPR) and Tactic DDC Activity in Design Practice Repository (DPR)
Cite this
"Domain-driven design". 1790551284. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1377133553 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy