Singleton vs Dependency Injection

This post is a showcase for the Singleton design pattern. In contrast to the common belief, Singleton is not inherently bad and I’ll try to show you in what circumstances it is a good choice.

Defensive programming: the good, the bad and the ugly

In this post, I want to take a closer look at the practice of defensive programming.

What is functional programming?

The topic of functional programming described here is a part of my Applying Functional Principles in C# Pluralsight course. In this article, I’ll try to answer the question: what is functional programming? Functional programming So, what is functional programming? This term arises quite often and every author writing about it gives their own explanation. I’m no exception. In my opinion, the simplest and at the same time precise definition is the following: functional programming is programming with mathematical functions.

Applying Functional Principles in C# Pluralsight course

My new course Applying Functional Principles in C# for Pluralsight went live. Applying Functional Principles in C# What interesting about functional programming is that it allows you to adhere to the most important software development principles, just as the DDD practices do. It helps reduce the cognitive load when you deal with your code base and thus keep your software maintainable in a long term. This course is based on the article series I posted awhile back.

Having the domain model separated from the persistence model

In this post, I’d like to write about a pretty common discussion in DDD circles: should one have the domain model separated from the persistence model? In other words, should you map your domain objects to the DB tables directly using an ORM or would it be better to use a separate set of Data Access Objects (DAOs) instead?

Trying to impress people with your code

In this post, I’d like to write about the personal traits we all possess. Namely, I want to talk about being proud of your code and trying to impress people with it.

Reference data as code

In this article, I’d like to write about a powerful technique that can potentially save you a lot of work and make your code much more concise: representing reference data as code.

Link to an aggregate: reference or Id?

In this post, I write about 2 ways of representing a link to an aggregate.

Mechanical approach to domain modeling

In this post, I’d like to talk about a mechanical approach to domain modeling. It sometimes arises when teams start applying Domain-Driven Design (DDD) principles to their projects and when they don’t have enough experience with it yet.

Partially initialized entities anti-pattern

The topic described in this article is a part of my Domain-Driven Design in Practice Pluralsight course. In this post, I’d like to talk about the partially initialized entities anti-pattern: anti-pattern that is often used in conjunction with repositories. Partially initialized entities Partially initialized entities are entities which are not fully constructed and returned as a result of some operation, usually an operation of fetching them from the database.