OOP, FP, and object-relational impedance mismatch
Today’s topic is gonna be about OOP, FP, and object-relational impedance mismatch. The goal of this article is to show how object-oriented and functional paradigms deal with relational data stores.
Verifying collaborations at the system edges
Last week I wrote about when to use mocks. In this post, I’d like to outline a specific guideline which comes into play when you start working with mocks: verifying collaborations at the system edges. This article is based on my recent Pluralsight course about Pragmatic Unit Testing. Verifying collaborations at the system edges The use of mocks goes hand in hand with the style of unit testing which I call collaboration verification.
When to use mocks
After two article series where I preached against the use of mocks in tests (first one, second one), I thought I would do a post which outlines situations where they are justified. This article is based on my recent Pluralsight course about Pragmatic Unit Testing. Inner-system vs inter-system communications The main issue with the use of mocks is that they encourage focusing on collaborations. That, in turn, often leads to coupling your tests to implementation details as those collaborations are usually not part of the SUT’s public API.
Pragmatic Unit Testing Pluralsight course
My new course Building a Pragmatic Unit Test Suite for Pluralsight went live. Building a Pragmatic Unit Test Suite Unit testing can be applied differently. Like many other things in programming, there are a lot of ways to mess up with it. It’s important to differentiate unit testing techniques that help bring confidence in your code base correctness from techniques that can potentially have a devastating effect on your entire test suite.
How to know if your Domain model is properly isolated?
In this post, I’ll show a simple way to get to know if your domain model is properly isolated.
Law of Demeter and immutability
In this post, we’ll discuss the Law of Demeter in the context of immutability.
Email uniqueness as an aggregate invariant
Aggregates carry out many important functions. One of them is maintaining consistency boundaries. In this post, I write about the requirement of global email uniqueness and how it is related to aggregate invariants.
Validation and DDD
Validation and DDD can be a tricky combination. How to perform validation in a way that doesn’t lead to domain knowledge leakage?
Domain services vs Application services
In this post, we’ll take a look at domain services: what differs them from application services and when it is preferable to use one in addition to an application service.
Domain model isolation
I’ve been using the term "domain model isolation" for a long time already but just recently realized that its meaning might not be as obvious as I thought. In this post, I’ll try to describe what it means to properly isolate your domain model and why it is important.