fe-framework.pousse-cafe-doc.0.7.1.source-code.index.html Maven / Gradle / Ivy
${domain.name} Domain Model
<#list domain.boundedContexts as context>
#list>
${domain.name} Domain Model
Version ${domain.version}
<#if includeGenerationDate>
Generated on ${generationDate?datetime?iso_utc}
#if>
${domain.name} Domain Model
Table of Contents
- Table of Contents
- Introduction
- ${domain.name} Domain
<#list domain.boundedContexts as context>
- ${context.name}
<#if context.aggregates?size gt 0>
- Aggregates
<#list context.aggregates as aggregate>
- ${aggregate.name}
#list>
#if>
<#if context.services?size gt 0>
- Services
<#list context.services as service>
- ${service.name}
#list>
#if>
<#if context.domainProcesses?size gt 0>
- Domain Processes
<#list context.domainProcesses as process>
- ${process.name}
#list>
#if>
#list>
- Ubiquitous Language
Introduction
This document describes ${domain.name} domain using concepts defined by
Domain-Driven Design (DDD) methodology. It was generated
directly from source code and can be considered as a close summary of what is actually implemented.
The following DDD elements are described in the remainder and shortly defined below. For more precise and complete
definitions, please refer to the litterature:
- Value Object: an object fully described by its attributes and with no identity nor life-cycle,
- Entity: an object with a life-cycle and an identity;
- Aggregate: a group of related value objects and entities, one of which being called the root of the aggregate;
- Service: an object representing an operation that is not naturally part of a value object or an entity;
- Domain Event: an object representing an event and used to communicate information between aggregates potentially
located in different bounded contexts;
- Bounded Contexts: they describe boundaries inside of which each component has a unique name and a given definition.
Some concepts might appear in different bounded contexts with the same name but with a slightly or completely different
definition.
The identity of an entity is generally represented by a special value object called the key. An aggregate is identified
by its root's key.
An additional non-DDD component is also described in next sections: the Domain Process. Domain processes are responsible
for calling commands on aggregates (and therefore, starting transactions when necessary). Expect for some commands initiating
a process, most of them are called when handling a Domain Event.
The following conventions are being used:
- As this document is generated directly from code, the domain is described by a set of bounded contexts.
Each bounded context is composed of a set of aggregates, services and domain processes.
- An undirected graph representing a bounded context is composed of boxes representing the aggregates. Edges represent relations
between aggregates i.e. the fact that one aggregate makes reference to another one.
- Value objects and entities are presented in the context of their aggregate. An undirected graph representing an aggregate
is composed of boxes (Entities) and ellipses (Value Objects). The aggregate root has thicker borders. Edges
represent relations between the different components. Dashed edges represent a reference made to another aggregate
via a Value Object (the key of the aggregate root). Dashed edges represent the relations shown in bounded context
graph.
- Domain processes are represented using directed graphs, each node being a step of the process. Entering a step of
a domain process generally implies the creation of a new aggregate or the update of an existing one. External steps
(i.e. steps executed outside of the process) are represented as dashed boxes. Edges are labeled with the name of the
domain event which implies the transition from one node to another.
The rest of the document is split in two parts:
- the description of the different bounded contexts and their components,
- the ubiquitous language, presented in the form of a glossary. Each entry is composed of a name, the bounded
context (if relevant), the type of component and a short description.
${domain.name} Domain
<#list domain.boundedContexts as context>
${context.name}
<#if context.description??>
${context.description}
#if>
<#if context.aggregates?size gt 0>
Aggregates
<#list context.aggregates as aggregate>
${aggregate.name}
${aggregate.description}
<#if aggregate.valueObjects?size gt 0>
Value Objects
<#list aggregate.valueObjects as valueObject>
- ${valueObject.name}: ${valueObject.description}
#list>
#if>
<#if aggregate.entities?size gt 0>
Entities
<#list aggregate.entities as entity>
- ${entity.name}: ${entity.description}
#list>
#if>
#list>
#if>
<#if context.services?size gt 0>
Services
<#list context.services as service>
${service.name}
${service.description}
#list>
#if>
<#if context.domainProcesses?size gt 0>
Domain Processes
<#list context.domainProcesses as process>
${process.name}
${process.description}
<#list process.steps as step>
- ${step.name}: ${step.description}
#list>
#list>
#if>
#list>
Ubiquitous Language
<#list ubiquitousLanguage as entry>
- ${entry.name}, ${entry.type}, ${entry.description}
#list>