Skip to content

Authorization: Domain or Application Layer?

I’m diving into a super common question that’s really important: where should your authorization live? Should it live within your domain or your application layer? I am going to show some real world code examples and some simple guidelines so you can keep your software architecture consistent and avoid authorization code scattered everywhere. YouTube Check out my YouTube channel, where I post all kinds of content on Software Architecture & Design, including this video showing everything in this post. Authentication versus Authorization I want to make the distinction because a lot of people mix these up. Authentication is who are you. That… Read More »Authorization: Domain or Application Layer?

Sponsor: Using RabbitMQ or Azure Service Bus in your .NET systems? Well, you could just use their SDKs and roll your own serialization, routing, outbox, retries, and telemetry. I mean, seriously, how hard could it be?

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

Your API Errors Suck (Here’s How to Fix Them)

I’ve been using an HTTP API as a consumer and how ti deals with it’s HTTP API Errors is terrible. Tt’s returning back a 200 OK. And in the body of the response, it has an error property that has a user facing message. You might be thinking, if you just return a 400 status code, all problems are solved. Well, not really, because ultimately you want some structure of data and a good developer experience so the developers can handle those errors, because often times you need to surface that to your end user. YouTube Check out my YouTube channel, where… Read More »Your API Errors Suck (Here’s How to Fix Them)

CRUD-Sourcing is why Your Event Streams Are Bloated

I see the same two issues come up over and over with event sourcing — they cause a lot of pain and they shouldn’t have to. Most of the pain stems from bad modeling, specifically because of CRUD-Sourcing. In this post I want to show why long event streams usually mean you’re modeling the wrong events, and how to fix that so your streams have natural starts and ends. YouTube Check out my YouTube channel, where I post all kinds of content on Software Architecture & Design, including this video showing everything in this post. The common problem: long event streams Look… Read More »CRUD-Sourcing is why Your Event Streams Are Bloated