Before C# 9, to make a property immutable, you had to use constructor injection. This broke object initializers (`new Obj { Prop = val }`). The `init` accessor solves this by allowing setting a property only during object initialization. The ‘init’ Keyword Why this matters for DTOs It allows for consistent, valid state without massive […]
Read more →Author: Nithin Mohan TK
C# 9.0 Records: Immutable Data Types Done Right
Immutability is a cornerstone of robust distributed systems, but achieving it in C# has historically required copious boilerplate. C# 9.0 introduces Records, a first-class citizen for immutable data. Records provide value-based equality, non-destructive mutation, and concise syntax. The Syntax Evolution Value-Based Equality Records check equality by properties, not reference. Non-Destructive Mutation (‘with’ expressions) To modify […]
Read more →Event-Driven Architecture with Azure Event Grid
Azure Event Grid is the backbone of event-driven architectures on Azure. It’s a fully managed event routing service that uses a publish-subscribe model. Unlike messaging services (Service Bus, Event Hubs), Event Grid is optimized for reactive programming patterns where you want instant notifications of state changes. Event Grid Architecture Key Concepts Topics are endpoints where […]
Read more →Blazor CSS Isolation: Scoped Styles in .NET 5
A preview feature for .NET 5 (arriving Nov 2020) is CSS Isolation. Similar to Vue’s `scoped` styles or React Modules, this prevents style leakage between components. How it Works Create a file matching the component name: `Counter.razor.css`. At build time, Blazor rewrites HTML with a unique attribute `b-123abc` and rewrites CSS: The Deep Combinator To […]
Read more →React 17: No New Features, Major Impact
React 17 is unusual – it’s the first major React release with no new features for developers. So why should you care? Because it fundamentally changes how React attaches to the DOM and enables a gradual upgrade path that will define React’s evolution for years. The Gradual Upgrade Story Previously, upgrading React was all-or-nothing. If […]
Read more →Azure Arc for Kubernetes: Unified Hybrid Cloud Management
Azure Arc extends the Azure control plane (ARM) to resources running outside of Azure—on-premises, in AWS, or GCP. With Arc-enabled Kubernetes, you can manage any K8s cluster (OpenShift, Rancher, GKE) right from the Azure Portal. GitOps with Flux Arc agents installed in the cluster include Flux CD. You can push configurations via Azure Policy. Azure […]
Read more →