Domain-Driven Design - Entities
In Domain-Driven Design an Entity is an object that represents an object with identity, for example, a person, a product, or an enterprise.
Characteristics
- Entities have an identity:
- Identity is immutable.
- Identity is globally unique.
- Identity is intangible (Does not exist in the real world, because real world identifiers can change).
- Entities can have Value Objects as properties.
- Entity’s properties should be edited only within it and do not expose reading and writing to any.
- Entities do not include metadata properties (Created on, created by, updated on, delete on, etc.) unless it is part of the business model.
- Entities can have a private constructor to prevent creating new instances from a public constructor.
- Entities can include a Static Factory Method pattern to return new entity instances.
Examples
Categories
Automation scripting Development tools Front end web development Infrastructure Kubernetes Programming guide Security Software architectureTags
Recent Posts
Restart Kubernetes pods following a schedule using Helm
Restart Kubernetes pods following a schedule using Kubectl
Create an Azure Key Vault with RBAC role assignments using Terraform
Get the download url of the latest GitHub release using Bash
Get the download url of the latest GitHub release using PowerShell