Mediator: Sync and Async Commands

D20Tek Mediator supports both synchronous and async commands. In many cases, synchronous commands are plenty. But when working with data files, external service calls, and databases, it is best for performance throughput to build async WebApi handlers and async commands that process that data. To this point, we have mostly looked at synchronous ICommandHandlers. Here … Continue reading Mediator: Sync and Async Commands

Is ASP.NET WebApi Pipeline Already a Mediator?

As we discussed in earlier posts, the Mediator and Command are patterns that can be implemented in different way. And those patterns already exist in many coding frameworks. As a matter of fact, the ASP.NET WebApi request pipeline can be considered a Mediator and Command implementation, especially when building MinimalApi. Remember that a Mediator encapsulates … Continue reading Is ASP.NET WebApi Pipeline Already a Mediator?

Getting Started with D20Tek.Mediator Package

There are a few Mediator and Command implementations in the .NET ecosystem. The most popular one has been Mediatr. But with the recent announcement that Mediatr is moving to a commercial license, many developers looking for alternatives. In an attempt to support the .NET community, I am building a simplified Mediator and Command library that … Continue reading Getting Started with D20Tek.Mediator Package

Understanding the Mediator and Command Patterns: Theory, Use Cases, and Trade-offs

In the world of software design, decoupling is a recurring goal. Systems built from loosely coupled components are more maintainable, testable, and scalable. But we still want to balance that with being easy to use in simple scenarios. Two design patterns that often work well together to achieve this are the Mediator and Command patterns. … Continue reading Understanding the Mediator and Command Patterns: Theory, Use Cases, and Trade-offs