Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Mediator between Integration Boundaries

If you have followed my Fat Controller CQRS Diet series, you will see that I use the mediator pattern. More specifically I use MediatR library in all the code examples. I recently gave a talk at CodeMash 2017 with the same title.   It went a bit more in depth about why and where I use the mediator pattern. Integration Boundary I want to decouple my application from the framework I’m using. The mediator pattern is one way of achieving that. My code should be be my code.  Not littered through framework code. Generally, I don’t want to have any dependencies on MVC, Web API,… Read More »Mediator between Integration Boundaries

Conference Speaking Experience: CodeMash 2017

At some point in 2016 I decided I wanted to submit talks to a few large conferences.  I’ve done talks at various small user groups, but nothing more than 30 people. The main reason to submit to larger conferences was just for the new experience.  It’s something that is completely out of my comfort zone to speak in front of a large group. I really wanted to see if speaking at conferences was something I would enjoy or not. Although I’ve realized that it’s really easy for me to talking about software and especially the areas that I’ve grown to… Read More »Conference Speaking Experience: CodeMash 2017

MediatR Behaviors

I was happy and surprised to see that MediatR v3.0 was released yesterday.  One of the new features, which I was really looking forward to are pipeline behaviors. A pipeline behavior is an implementation of IPipelineBehavior<TRequest, TResponse>. It represents a similar pattern to filters in ASP.NET MVC/Web API or pipeline behaviors in NServiceBus. Changes There are a couple major breaking changes to v3.  All of them I’m fairly happy about actually. Messages There is no distinction between sync, async (cancellable) requests or notifications. You simply implement either IRequest or INotification. You must still create the appropriate handler via either IRequestHandler, IAsyncRequestHandler, ICancellableAsyncRequestHandler. Async To… Read More »MediatR Behaviors