No More Data Transfer Objects: A Guide to Adopting CQRS 📝🔎
In the software engineering industry, the term CQRS is used quite often. It describes a pattern which allows you to handle services in your system in a vertical manner. It gives you the ability to free yourself from any other service in the same domain and allows you to focus on the service that you wish to implement. I know that there are hundreds of other resources that can explain the CQRS pattern better in terms of definition and philosophy. However, in this article I'm going to explain it in another way, a rather practical way. Imagine you have an entity named Customer . Normally if we follow clean architecture , we will have a single horizontally scaled service called CustomerService . In this CustomerService there are all types of services that perform different operations on this entity. However not all services need to operate on the whole entity model. This is why Data Transfer Objects exist. Data Transfer Objects (DTOs) are a simplified versions of entity mode...