Domain Driven Design
Why bother?
Domain modeling is used for various purposes:
To explore unknown domains. The act of making domain models is an efficient way to familiarize yourself with a new domain and to unravel anfractuous jargon.
To define the boundaries of individual services. A domain model should make these boundaries clear, to develop components as independently as possible.
To avoid misunderstandings over terminology in a project with multiple stakeholders. A terminology list does not always suffice in practice. A domain model should consolidate consensus and make misunderstandings explicit and debatable before they do harm.
Learning. A learner must familiarize herself with new words and specific phrases. Making a domain model improves both the speed and depth of learning.
The Ampersand way of domain modeling is classic in the sense that a conceptual model is made of a domain of your choice. It differs from other approaches in specific ways:
Your model can be interpreted by a computer to create specific useful artifacts, such as a data model, a prototype implementation, or documentation;
Your model has an interpretation in natural language, which you can use to calibrate and uniform the language of the business.
Steps
Here is a summary of the things you do.
Start with an informal analysis of the business, defining
stakeholders, such as: sales rep, student, DBA, inspector, etc.
relevant areas of expertise, such as insurance, security, legal, management, etc.
business functions, such as invoicing, applying for a job, computing rates, etc.
In essence, this step yields three lists. You obtain them by studying documentation and talking to people as you scope your work.
Formalize concepts and relations to reconstruct the language of the business. Validate that language with your stakeholders, creating consensus over terms and phrases. Your goal is to define the smallest agreed language in which agreements can be expressed.
Use this language and adapt it when needed:
to generate visual representations of your domain model (letting your computer do the drawing work);
to resolve language-based misunderstandings in your team;
to generate a database, either for prototyping or production purposes;
to define, verify and validate services that constitute your application;
to audit designs;
to generate documentation (letting your computer do a lot of writing);
other purposes, that arise incidentally.
In essence, this step yields a conceptual model of your domain. In some cases, however, the act of modeling is more important than having the model.
draw boundaries to define bounded contexts. Identify reusable patterns. Identify entities, attributes, aggregates and services for each bounded context. Assign developers, stakeholders, product-owners to develop each bounded context further.
Informal analysis
Formalize concepts and relations
Use and maintain the model
Drawing boundaries
Last updated