Open in app

Sign in

Write

Sign in

Vladimir Khorikov
Vladimir Khorikov

347 Followers

Home

About

Apr 19, 2022

Modeling Relationships in a DDD Way

Let’s talk about modeling of relationships, including the dreaded many-to-many relationships, in a DDD way. 1. Types of relationships There are 4 types of relationships between tables in a relational database: One-to-many, Many-to-one, Many-to-many, One-to-one. Let’s discuss each of these types separately. 1.1. One-to-many relationships This is the most common type of relationship. To give an example…

Ddd

11 min read

Modeling Relationships in a DDD Way
Modeling Relationships in a DDD Way
Ddd

11 min read


Feb 16, 2022

Collections and Primitive Obsession

Does the primitive obsession anti-pattern apply to collections? In other words, should you introduce a custom class for a collection? 1. Preamble Primitive Obsession is an anti-pattern that takes place when you overuse primitive types, especially to model your domain. This anti-pattern is widely known in both DDD and functional programming communities…

Programming

4 min read

Collections and Primitive Obsession
Collections and Primitive Obsession
Programming

4 min read


Sep 1, 2021

Database and Always-Valid Domain Model

Today, we’ll talk about an important question: how does the application database fit into the concept of Always-Valid Domain Model? In other words, is the database part of the always-valid boundary or should you consider it an external system and validate all data coming from it? 1. Always-Valid Domain Model Just a quick reminder…

Ddd

6 min read

Database and Always-Valid Domain Model
Database and Always-Valid Domain Model
Ddd

6 min read


Jul 28, 2021

Specification Pattern vs Always-Valid Domain Model

There’s an interesting controversy between two DDD topics: the Specification pattern and the Always-Valid domain model. 1. Specification pattern I’ve written multiple articles about the Specification pattern, including another controversy: Specification vs CQRS patterns. This time, we’ll look at the contradiction the Specification pattern has with another DDD concept: Always-Valid Domain model. Just…

Ddd

5 min read

Specification Pattern vs Always-Valid Domain Model
Specification Pattern vs Always-Valid Domain Model
Ddd

5 min read


Apr 13, 2021

Static methods considered evil?

Are static methods good or bad? Over the course of my career I did a full circle on this topic. In this article, I’ll try to describe this evolution and the reasoning behind it. 1. Oh, cool, static methods! After learning about static methods for the first time, most people (myself included) become enthusiastic. …

Programming

5 min read

Static methods considered evil?
Static methods considered evil?
Programming

5 min read


Feb 4, 2021

Always-Valid Domain Model

I was re-reading some old articles about always-valid domain models, including this one form Jeffrey Palermo and the response to it from Greg Young. I highly recommend that you read them both if you haven’t already. This post is another response to Jeffrey’s article, which will hopefully complement Greg’s one. 1. Not-always-valid domain model …

Domain Driven Design

13 min read

Always-Valid Domain Model
Always-Valid Domain Model
Domain Driven Design

13 min read


Sep 24, 2020

Domain model purity and the current time

I’m continuing the topic of domain model purity. This time, we’ll look at it with regards to getting the current date and time. By the way, be sure to subscribe to my email list. Not all discussions fit the format of a blog post (including some shorter takes on the…

Unit Testing

5 min read

Unit Testing

5 min read


Aug 11, 2020

The CAP theorem of domain modeling

I’ve been meaning to write this article for a long time and, finally, here it is: the topic of domain model purity versus domain model completeness. Domain model completeness In this article, we’ll talk about a trilemma that comes up in each and every project. To best describe this trilemma, we need to…

Ddd

7 min read

The CAP theorem of domain modeling
The CAP theorem of domain modeling
Ddd

7 min read


Jun 29, 2020

How to Unit Test an Abstract Class

How to unit test an abstract class? Or a whole class hierarchy that depends on that abstract class? Let’s see. Unit testing an abstract class Imagine you work on a people software in a university and have the following code: public class Student { public string Name { get; set; } …

Unit Testing

5 min read

How to Unit Test an Abstract Class
How to Unit Test an Abstract Class
Unit Testing

5 min read


Jun 15, 2020

DRY vs DAMP in Unit Tests

In this post, we’ll make a deep dive into the DRY and DAMP principles and will talk about the false dichotomy around them. The DRY and DAMP principles The DRY principle stands for “Don’t Repeat Yourself” and requires that any piece of domain knowledge has a single representation in your code base. In other words…

Unit Testing

11 min read

DRY vs DAMP in Unit Tests
DRY vs DAMP in Unit Tests
Unit Testing

11 min read

Vladimir Khorikov

Vladimir Khorikov

347 Followers

Author of https://amzn.to/2QXS2ch. Founder of https://enterprisecraftsmanship.com/

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams