From layers to vertical slices - simplify your code and focus on your features.

Jon Hilton Profile Picture Jon Hilton

We've all experienced that moment when your boss/customer calls you and says;

"This is just a small change, I can't imagine it would take more than half an hour or so"

And your heart sinks, because you know what these "small" tweaks actually entail.

You have to find the code, which means navigating all the "layers" of your application.

If you're lucky, you can locate the relevant ASP.NET controller, but you know that's only the start.

3 hours later, you're knee-deep in your Data Access Layer, desperately trying to figure out where this "small tweak" needs to be made, wondering if it's lunchtime yet.

It doesn't have to be this way!

You can skip a lot of this pain by leveraging the idea of "vertical slices".

When you build and architect your application around individual features, magical things start to happen;

You always know exactly where to look for the code that makes any given feature tick

You can use tests to be confident your feature actually does what the user/customer wants it to do (imagine that!)

You get to work with (and write) simple code

You can get all your work done in a few hours and bunk off early (OK, maybe not, but we can dream...)

So join me as we explore what vertical slices are, how you can approach any feature and specific tips and techniques for making this come to life using ASP.NET Core and MediatR.