Keep your domain model decoupled from frameworks

Authors: Kenny Baas-Schwegler

Submitter: Kenny Baas-Schwegler

How can I let my domain model be decoupled from technical complexity?

Short description

The domain model is the core of our bounded context. When we implement the domain model we want the ability to keep this consistent with our ubiqituous language. We want the ability to quicly refactor this to represent our mind-model of our domain model.

Examples

In java and C# you see the use of ORM mapping like JPA and Entity Framework in our domain model. This can quickly lead high coupling with our database domain.

Context

When we implement domain models we want to seperate the domain model from other layers to keep the domain clean. We sometimes see the use of frameworks like ORM mapping in the domain model for easier use. This can lead to high coupling between the domain model and the database model, which we don't want.

Tags

Follow us

Read our latest news from Virtual DDD on any of these social networks!

Recent heuristics

Align with domain experts

Short description Align boundaries with the parts of the domain where there are different domain experts (not different people but different domain skills/knowledge). Context We should align boundaries in sociotechnical systems with our business processes to minimise...

Align bounded context with the value stream

Short description Align bounded contexts in socio-technical systems to support the value stream of the business. Use these at a strategic level when you are in a position to understand the value stream of the business. Examples For example, in an ecommerce company...