Authorization, should it go in your Domain or Application Layer? It's a super common question, so here are examples and guidelines.| CodeOpinion
Snapshots in Event Sourcing represent state at a point in time. They allow you to rehydrate your aggregates without replaying all events.| CodeOpinion
How do you persist your Aggregate (Root) using Entity Framework? Or if you're not using an ORM? Separate data from behaviors in both cases.| CodeOpinion
Software Architecture & Design| CodeOpinion
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… Read More »Your API Errors Suck (Here’s How to Fix Them) The post Your API Errors Suck (Here’s How to Fix Them) appeared first on CodeOpinion.| CodeOpinion
Long event streams and the pain that comes with it stem from bad modeling, specifically because of CRUD-Sourcing.| CodeOpinion
Regex for email validation sounds like a simple thing, but it's often times very misused and conflating email and mailbox validation.| CodeOpinion
One of the most common questions I get is how to compose data when different services each own their own data. You might have product details owned by the catalog service, pricing owned by sales, reviews owned by a reviews service, shipping information somewhere else, and order counts somewhere else. How do you get all… Read More »Composing Data from Multiple Services The post Composing Data from Multiple Services appeared first on CodeOpinion.| CodeOpinion
I want to give you three different examples and reasons why you might want to separate customers and orders into different databases.| CodeOpinion
Loosely Coupled Monolith is focusing on cohesion, managing coupling, and that logical boundaries aren’t your physical boundaries.| CodeOpinion
How do you know if you should use Domain Driven Design? Does your domain have complexity and require boundaries?| CodeOpinion
In domain-driven design, you might think about aggregates when domain modeling? But often, that approach is backward. Here's why.| CodeOpinion
Want to start with Domain-Driven Design (DDD)? Don't start with sample apps or looking at code. It's the wrong place to start.| CodeOpinion
Database migrations can be tricky, depending on your application and environment. The key is making backward-compatible changes!| CodeOpinion
A common and very overlooked issues when writing a distributed system is consistency. Without it you'll be left scratching your head.| CodeOpinion
If you’re looking at using .NET Channels as a replacement for a MediatR, or if you’re not in .NET but searching for an in-memory producer-consumer API, hang on a second—because you might be in for a pile of pain. That’s not actually what you want. YouTube Check out my YouTube channel, where I post all kinds of… Read More ».NET Channels as a In-Memory Message Bus – Beware! The post .NET Channels as a In-Memory Message Bus – Beware! appeared first on CodeOpinion.| CodeOpinion
The five most common mistakes that make code unmaintainable. As your system grows, it becomes impossible to make changes without breaking.| CodeOpinion
I want to talk about something that might sound like a contradiction in terms: the serverless monolith. If you’re scratching your head right now, thinking, “Wait, that makes no sense, serverless is for microservices!” then stick with me. I’m going to clear up one of the biggest misconceptions out there and explain why a serverless… Read More »You DON’T Need Microservices for Serverless! The post You DON’T Need Microservices for Serverless! appeared first on CodeOpinion.| CodeOpinion
When you need to scale your API, first thought is often, “Let’s just add a cache.” If API Caching were that simple. It's not.| CodeOpinion
If you’re working in a system that’s hard to change, it can be incredibly frustrating. It feels brittle, as if making a change in one part causes a bug or some negative side effect in another part that you had no idea about. You want to improve your system, but how? How do you go… Read More »Database Coupling: How to FIX a Spaghetti Code System The post Database Coupling: How to FIX a Spaghetti Code System appeared first on CodeOpinion.| CodeOpinion
I’ve made some architectural decisions I’m proud of and some I definitely regret. Here's what I've learned over the last decade.| CodeOpinion
I’m convinced that CRUD APIs and CRUD-driven systems—meaning systems built around Create, Read, Update, and Delete operations—are, in the long run, the hardest to change and evolve. This might sound unintuitive at first, especially since many of us have read blog posts, watched videos, or taken courses on building HTTP APIs under the guise of… Read More »CRUD APIs are Poor Design The post CRUD APIs are Poor Design appeared first on CodeOpinion.| CodeOpinion
Something that’s often overused, misunderstood, or just incorrectly applied in software development: Data Transfer Objects (DTOs)| CodeOpinion
What's the biggest scam in tech that is deemed acceptable? Best practices. Everything has trade-offs and your context matters.| CodeOpinion
Why not self-host using a VPS or dedicated hardware instead of using the cloud? Well, there are a lot of reasons. The cloud isn’t just about scaling; it’s about managed services. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Dissecting the… Read More »Cloud vs Self-Hosting The post Cloud vs Self-Hosting appeared first on CodeOpinion.| CodeOpinion
There’s been a noticeable pushback against microservices lately, and we’re seeing a strong swing back toward monoliths. But I have to ask, if you can’t build a solid microservices system, what makes you think you can build a good monolith? YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including… Read More »Microservices to Monolith The post Microservices to Monolith appeared first on CodeOpinion.| CodeOpinion
You might have heard the recommendation to steer clear of static variables or methods. But is that really good advice?| CodeOpinion
Vertical Slice Architecture Myths are a plenty. As with everything that becomes more popular there is misunderstandings that spread.| CodeOpinion
Tired of changing one part of a system, only to have another part break? Write stable code! Use coupling metrics to guide your design!| CodeOpinion
Don't get bogged down by "persistence ignorance". Your data model matters as much as your domain model. Realize they are two different things.| CodeOpinion
Nobody likes working in a brownfield legacy codebase. But is it avoidable? It is! Here's 3 tips for keeping your system evergreen.| CodeOpinion
What is cohesion and why should you care? Highly cohesive software design can reduce complexity and coupling if done correctly.| CodeOpinion
Entity Services can cause low cohesion and in turn cause high coupling. Focusing on capabilities will increase cohesion and lower coupling.| CodeOpinion
How do you handle long-running HTTP requests that take a long time to complete? Move the work async and return to the client immediately.| CodeOpinion
Need resilience in your system? Look no further than the bulkhead pattern which is about creating isolation in various parts of your system.| CodeOpinion
What are the "best practices" when you design REST APIs? There are a lot that solve problems that you might not need to have.| CodeOpinion