Coding Militia

From domain events to infrastructure - thinking out loud about possible approaches I don’t hate

On the topics of domain-driven design and event-driven architecture, something that’s been on my mind for quite some time, is the process of handling domain events, as well as potentially translating them into integration events.

May 16, 2023 · 16 min · 3237 words · João Antunes

Checking out EF Core inheritance options

Recently there was a need to use a hierarchy in a domain model, and there was a question about which of the available approaches to use - table per hierarchy (TPH), table per type (TPT) or table per concrete type (TPC). This very brief post is just a quick look at some benchmarks I created on the subject.

May 8, 2023 · 10 min · 1931 words · João Antunes

A reminder to consider that your context, isn’t the only context (.NET 8 TimeProvider edition)

This will be a very brief post, just as a reminder that we need to give things a good thought, trying to limit our biases (I’ll focus on software development, but it’s applicable to everything really).

April 24, 2023 · 4 min · 653 words · João Antunes

Contract first OpenAPI development (but still use Swagger UI with ASP.NET Core)

In C# and .NET land, we’re pretty heavy on the code first approaches, with the odd exception. Let’s take a look at a possible contract first approach to API development, with OpenAPI, but still taking advantage of existing tooling that we’ve come to rely on, like Swagger UI.

April 2, 2023 · 12 min · 2411 words · João Antunes

Mapping ASP.NET Core minimal API endpoints with C# source generators

I’m pretty late to the C# source generator party, but hey, better late than never 😅. In this post, let’s take a look at how we can automagically map minimal API endpoints using C# source generators

January 31, 2023 · 8 min · 1624 words · João Antunes

The “insert specific tech here” developer: yay or nay?

The boxes developers put themselves into is something I’ve given some thought over time. Probably not something folks think about much, but figured I’d write a post about it anyway.

January 19, 2023 · 9 min · 1790 words · João Antunes

On résumé-driven development, FOMO and dismissing it

I’ve had some of thoughts not exactly résumé-driven development, but more importantly, how engineers, can remain up to date and relevant in the job market, and a recent discussion on LinkedIn reminded me about it.

November 7, 2022 · 3 min · 544 words · João Antunes

Beware of records, with expressions and calculated properties

I’ve been using C# records a lot since the feature was introduced. However, when using them, we really need to understand how they work, otherwise we might face unexpected surprises.

September 1, 2022 · 6 min · 1226 words · João Antunes

[Video] Outbox meets change data capture - hooking into the Write-Ahead Log (feat. .NET, PostgreSQL & Kafka)

Another video on using change data capture (often referred to as CDC), to hook up into the database transaction log, forwarding incoming entries to the outbox table.

July 27, 2022 · 1 min · 136 words · João Antunes

[Video] What's the point of async/await in an ASP.NET Core application?

I’ve been noticing in recent chats that folks have difficulty explaining why do we use async/await, tasks and related, when building ASP.NET Core applications.

May 30, 2022 · 1 min · 93 words · João Antunes