Updating our Clean Architecture template for .NET 6 involves enforcing stricter boundaries using `ImplicitUsings`. Project References The Core layer (`Domain`) should have ZERO dependencies. In .NET 6, we can enforce this by stripping out accidental imports. This compiler-level enforcement prevents junior developers from injecting HTTP clients into Domain Entities.
Read more โSearch Results for: events
Azure Service Bus: Messaging Patterns
Service Bus is Azure’s fully managed enterprise message broker. It supports Queues (point-to-point) and Topics/Subscriptions (pub/sub). Choosing the right pattern prevents architectural headaches. Queues vs Topics Dead-Letter Queue Messages that fail processing N times go to a special DLQ for inspection and replay. Key Takeaways Use **Sessions** for ordered processing (FIFO for a specific session […]
Read more โManaging Terraform State in Azure
Terraform’s `.tfstate` file is gold. If it’s lost or corrupted, Terraform cannot track what resources exist. You **must** store state remotely with locking. Azure Backend Configuration State Locking Azure Blob’s native lease mechanism prevents concurrent writes. Key Takeaways Never commit `.tfstate` to Git. Enable **soft delete** on the storage account to recover corrupted state. Use […]
Read more โAzure Container Apps: KEDA and Dapr Managed
Azure Container Apps (ACA) is the “Serverless Containers” offering we’ve been waiting for. Built on Kubernetes but hiding the cluster, it integrates **KEDA** (for event-driven scaling) and **Dapr** (for building blocks) natively. Scaling to Zero Unlike App Service, ACA can scale to 0 replicas when no events are processing, saving money. Dapr Integration Enable Dapr […]
Read more โAzure Web PubSub: Real-time WebSockets
SignalR is great, but sometimes you want raw WebSockets or support for other languages (Python, Java clients). **Azure Web PubSub** is a managed WebSocket service that supports native WebSocket clients and the PubSub subprotocol. Architecture The service handles the massive concurrent connections. Your server only handles events (Connect, Message) via Webhooks. Key Takeaways Supports standard […]
Read more โC# 9 Source Generators: Removing Reflection
Reflection is slow. It happens at runtime, bypasses type safety, and prevents trimming. Source Generators solve this by generating code at compile time. In this guide, we build a generator that automatically implements a `MapTo` method for DTOs, replacing AutoMapper. The Goal The Generator Logic Key Takeaways Source Generators enable **Zero-Overhead abstractions**. They are essential […]
Read more โ