Types of CQRS

CQRS is a pretty defined concept. Often, people say that you either follow CQRS or not, meaning that it is some kind of a binary choice. In this article, I’d like to show that there is some wriggle room in this notion and how different types of CQRS can look like. Type 0: no CQRS With this type, you don’t have any CQRS whatsoever. That means you have a domain model and you use your domain classes for both serving commands and executing queries.

DTO vs Value Object vs POCO

In this article, I’d like to clarify the differences in DTO vs Value Object vs POCO where DTO stands for Data Transfer Object, and POCO is Plain Old CLR Object, also known as POJO in Java environment.

How we think

Did you think about how we think? How do we come up with a solution and how we decide whether it’s good or bad? It seems like a very interesting topic, so let’s dive in!

8 Resharper shortcuts everyone should know

If you use Resharper, you must have been using some (or maybe most) of its features already. But what I see a lot is that some really useful features are left unattended. I want to describe those lesser known yet very useful features that can help you in your day-to-day work.

Functional C#: Handling failures, input errors

The topic described in this article is a part of my Applying Functional Principles in C# Pluralsight course. In this article, I’m going to write about how to deal with failures and invalid input in a functional way. Functional C#: Immutability Functional C#: Primitive obsession Functional C#: Non-nullable reference types Functional C#: Handling failures and input errors Handling errors in C#: the common approach The concept of validation and error processing is well known, but the code required to handle it may become really annoying in languages like C#.

Functional C#: Non-nullable reference types

The topic described in this article is a part of my Applying Functional Principles in C# Pluralsight course. This is the third article in my Functional C# series. Functional C#: Immutability Functional C#: Primitive obsession Functional C#: Non-nullable reference types Functional C#: Handling failures and input errors C# non-nullable reference types: state of affairs Look at the code example below:

Functional C#: Primitive obsession

The topic described in this article is a part of my Applying Functional Principles in C# Pluralsight course. This is the second article in my Functional C# blog post series. Functional C#: Immutability Functional C#: Primitive obsession Functional C#: Non-nullable reference types Functional C#: Handling failures and input errors What is primitive obsession? Primitive obsession stands for using primitive types to model domain.

Functional C#: Immutability

The topic described in this article is a part of my Applying Functional Principles in C# Pluralsight course. I’m starting a series of articles in which I want to show how to program in C# in a more functional way. Functional C#: Immutability Functional C#: Primitive obsession Functional C#: Non-nullable reference types Functional C#: Handling failures and input errors Why immutability?

Exceptions for flow control in C#

The use of exceptions for flow control was raised quite a few times already (here’s a c2 discussion and here is a great question on SO). I’d like to summarize this topic and provide some common use cases along with code examples to handle them. Exceptions for flow control: why not? Generally, code is read more often than written. Most of the best practices aim to simplify understanding and reasoning about the code: the simpler code, the fewer bugs it contains, and the easier it becomes to maintain the software.

C# code contracts vs input validation

Input validation rules are often taken for code contracts. In this post, I’ll try to cover their differences and show what their common use cases are.