In the previous post, we implemented a really simple file-based repository that used the pickle module. As we didn’t use a database, we didn’t have
Repository pattern – why do we need it? The main goal of the repository pattern is to abstract the logic used for retrieving (loading) and
In the previous post, we discussed the implementation of Value Objects. This time let’s focus on a different kind of Domain Objects – Entities. The
A Value Object is one of the fundamental building blocks of Domain-Driven Design. It is a small object (in terms of memory), which consists of
In Domain-Driven Design we have a clear separation between the Domain, Application, and Infrastructure. If we are talking about the business rules, then then the
Some time ago I stumbled across an interesting problem. In a Python web app, I wanted to add a correlation_id to each log produced by
Motivation When I decided I want to learn DDD, I needed a sample project to work on. I know that there are plenty of great
This example is taken directly from Flask tutorial but you will likely find similar examples for other frameworks as well. What does it do? Well,
As you may already know, Python is one of the world’s fastest-growing programming languages. It’s flexible, easy to use, fast to prototype and develop, and