|||

Domain Driven Design Core Principles

High Level View

1. Ubiquitous language

  • Same language between product owners and developers.
  • helps efficient communications

2. Bounded Context

  • Define clear boundaries between parts of the system
  • Helps will Microservice architecture

3. Core Domain

  • The actual business problem of the application
  • Not any 3rd party utils / lib code

Entities vs Value Objects

  • Entities have ID and Reference equality
  • Entities are mutable
  • Entities can exist with value objects
  • Entities can be persisted which ValueObjects are a logical grouping of the some data in that entity.
  • Entities cannot be passed between aggregates ~
  • Value objects have reference and structural equality
  • Value objects dont have an ID field and can be treated interchangeably
  • Values objects are immutable
  • Value objects require an entity to be relevant and shouldnt exist outside the entity and do not require separate db tables for persistance, they hold / group logical info together like Money (1c, 2c, 5Dollar etc.)
  • Value objects can be passed between aggregates as they are immutable.

Entity Vs Value Object

Aggregates

  • A conceptual whole
  • Is a logical grouping of Entities
  • An Aggregate has Invariants (a.k.a Validations) that ensures the aggregate is in a consistent state all the time.
  • Every aggregate has a RootEntity. Other aggregates can only talk to the RootEntity and not sub entities.
  • Aggregates should be saved in a single db txn

Entity Vs Value Object

Up next Apple Push Notifications With Amazon SNS Docker-Compose in AWS ECS with EFS volume mounts
Latest posts Refactor react code to use state store instead of multiple useState hooks Notes on Python Threat Modelling - Using Microsoft STRIDE Model WCAG - Notes Flutter CI/CD with Azure Devops & Firebase - iOS - Part 1 Flutter CI/CD with Azure Devops & Firebase - Android - Part 2 How to samples with AWS CDK A hashicorp packer project to provision an AWS AMI with node, pm2 & mongodb Some notes on Zeebe (A scalable process orchestrator) Docker-Compose in AWS ECS with EFS volume mounts Domain Driven Design Core Principles Apple Push Notifications With Amazon SNS AWS VPC Notes Building and Deploying apps using VSTS and HockeyApp - Part 3 : Windows Phone Building and Deploying apps using VSTS and HockeyApp - Part 2 : Android Building and Deploying apps using VSTS and HockeyApp - Part 1 : iOS How I diagnosed High CPU usage using Windbg WCF service NETBIOS name resolution woes The troublesome Git-Svn Marriage GTD (Getting things done) — A simplified view Javascript Refresher Sharing common connection strings between projects A simple image carousel prototype using Asp.net webforms and SignalR Simple logging with NLog Application logger SVN Externals — Share common assembly code between solutions Simple async in .net 2.0 & Winforms Clean sources Plus Console 2 — A tabbed console window