Category: Downside or Upsides?Page 1 of 2

Anti-pattern – Big Ball of Mud – Getting Started with Vertical Slice Architecture

Before you begin: Join our book community on Discord Give your feedback straight to the author himself and chat to other early readers on our Discord server (find…

Conclusion – Mediator and CQRS Design Patterns

With MediatR, we packed the power of a CQS-inspired pipeline with the Mediator pattern into a Clean Architecture application. We broke the coupling between the request delegates and…

Using MediatR as a mediator – Mediator and CQRS Design Patterns-2

As you may have noticed in the code, I chose the same pattern to build the commands as I did with the CQS sample, so we have a…

Using MediatR as a mediator – Mediator and CQRS Design Patterns-1

In this section, we are exploring MediatR, an open-source mediator implementation.What is MediatR? Let’s start with its maker’s description from its GitHub repository, which brands it as this:…

Project – CQS – Mediator and CQRS Design Patterns-2

We cover ways to organize commands and queries in subsequent chapters. Let’s start with the JoinChatRoom feature: public class JoinChatRoom{    public record class Command(IChatRoom ChatRoom, IParticipant Requester) :…

Project – CQS – Mediator and CQRS Design Patterns-1

Context: We need to build an improved version of our chat system. The old system worked so well that we need to scale it up. The mediator was…

Conclusion – Mediator and CQRS Design Patterns

As we explored in the two preceding projects, a mediator allows us to decouple the components of our system. The mediator is the middleman between colleagues, and it…

Project – Mediator (IChatRoom) – Mediator and CQRS Design Patterns-2

The ChatRoom class is slimmer than the User class. It allows participants to join and sends chat messages to registered participants. When joining a ChatRoom, it keeps a…

Project – Mapperly – Object Mappers, Aggregate Services, and Façade-2

It is pretty straightforward but creates a strong bond between the generated class and its consumers. You can use those static methods if having a hard dependency on…

Project – Mapperly – Object Mappers, Aggregate Services, and Façade-1

Mapperly is a newer object mapper library that leverages source generation to make it lightning-fast. To get started, we must add a dependency on the Riok.Mapperly NuGet package….