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

.NET

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

2016 Year in Review

I usually don’t think about a calendar year or do any type of reflection for a specific time period. I generally feel like I’m always in continuous improvement mode. But for whatever reason, I started looking back at 2016 to see what (if anything) I felt like I accomplished. I originally tweeted this on December 31st.  Only one of these was actually a “goal” at the beginning of the year. Blogged regularly in 2016, started a local #dotnet UG, spoke more. Building more on that in 2017. — Derek Comartin (@codeopinion) December 31, 2016 I didn’t have any intent of… Read More »2016 Year in Review

Fat Controller CQRS Diet: Trade-offs

In my Fat Controller CQRS Diet series, I’ve shown the mediator pattern and the MediatR library. After a recent discussion with Reid Evans, he made me realize I haven’t really described the trade-offs.  This post is going to focus on trade-offs and an alternative to using the mediator pattern. If you’re new to this series, here are earlier posts to get you up to speed: Overview of Series Simple Query Simple Command Command Pipeline Notifications Vertical Slices Coupling With the mediator pattern, communication between objects is encapsulated with a mediator object. Objects no longer communicate directly with each other, but instead… Read More »Fat Controller CQRS Diet: Trade-offs