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

Find MediatR Requests without Handlers

You’ve run into it.  MediatR throwing an InvalidOperationException when you didn’t have a matching handler for a request.   There’s a fairly simple solution to prevent this: Find MediatR Requests without Handlers. So here’s some quick code you can throw in a unit test to verify you don’t have any missing handlers. Find MediatR Requests without Handlers View the code on Gist. The above code uses reflection to get all the IRequest<>, RequestHandler<> and RequestHandler<,>.  Also worth mentioning it leverages Autofac for the IsClosedTypeOf method in the linq query. Usage Here’s a quick unit test that shows it’s usage for finding… Read More »Find MediatR Requests without Handlers

Practical Microsoft Orleans

I’ve been wanting to take a deeper dive into Microsoft Orleans for awhile now.  With the next release targeting .NET Standard 2.0, it felt like an great time to do it.  This is the first blog post in a series that will go beyond a simple Hello World.  The plan is to make this a practical Microsoft Orleans guide to follow along with. Blog Post Series: Part 1 – Practical Orleans Part 2 – Grains and Silos Part 3 – Smart Cache Pattern Part 4 – Event Sourced Grain Part 5 – EventStore for Grain Persistence Microsoft Orleans If you… Read More »Practical Microsoft Orleans

Tackling Technical Debt using NDepend

Technical debt is an interesting term in our industry.  To a certain degree I feel like its a bit overloaded now.  Everyone has a slight variation of what their definition of it is.  I often think the variation revolves around Fowler’s “reckless vs prudent, the second, deliberate vs inadvertent.”. Regardless, I think the general concept that is in everyone’s definition is that technical debt, if not paid back over time, can cause a code base to be unmanagable.  The length of time to deliver value increases because of the complexity. Just a refresher per Ward Cunningham: Shipping first time code is like… Read More »Tackling Technical Debt using NDepend