Loading...
Skip to Content

Blog

Category: Domain-Driven Design
14May 2020

Handling concurrency - Aggregate Pattern and EF Core

In this post I would like to discuss a frequently overlooked, though in some circumstances very important topic – concurrency handling in context of protection of the so-called Domain Invariants.

28October 2019

Attributes of Clean Domain Model

There is a lot of talk about clean code and architecture nowadays. There is more and more talk about how to achieve it. The rules described by Robert C. Martin are universal and in my opinion, we can use them in various other contexts. In this post I would like to refer them to the context of the Domain Model implementation, which is often the heart of our system. We want to have a clean heart, aren't we?

18June 2019

Handling Domain Events: Missing Part

Some time ago I wrote post about publishing and handling domain events. In addition, in one of the posts I described the Outbox Pattern, which provides us At-Least-Once delivery when integrating with external components / services without using the 2PC protocol. This time I wanted to present a combination of both approaches to complete previous posts. I will present a complete solution that enables reliable data processing in the system in a structured manner taking into account the transaction boundary.

4March 2019

Domain Model Validation

In previous post I described how requests input data can be validated on Application Services Layer. I showed FluentValidation library usage in combination with Pipeline Pattern and Problem Details standard. In this post I would like to focus on the second type of validation which sits in the Domain Layer – Domain Model validation.

13February 2019

Domain Model Encapsulation and PI with Entity Framework 2.2

Domain Model encapsulation implementation with Persistence Ignorance in mind using Entity Framework.

4February 2019

Simple CQRS implementation with raw SQL and DDD

In this post I wanted to show you how you can quickly implement simple REST API application with CQRS using the .NET Core.

11October 2018

How to publish and handle Domain Events

Domain Event is one of the building blocks of Domain Driven Design. It is something that happened in particular domain and it captures memory of it. We create Domain Events to notify other parts of the same domain that something interesting happened and these other parts potentially can react to.

26September 2018

Processing multiple aggregates - transactional vs eventual consistency

When we use Domain Driven Design approach in our application, sometimes we have to invoke some method on multiple instances of aggregate of the same type.