Server-Sent Events in ASP.NET Core and .NET 10
Explains how to implement Server-Sent Events (SSE) in ASP.NET Core Minimal APIs with .NET 10, comparing SSE to SignalR and providing a practical example.
Khalid Abuhakmeh is an experienced .NET developer sharing practical insights on ASP.NET, C#, and modern web development.
100 articles from this blog
Explains how to implement Server-Sent Events (SSE) in ASP.NET Core Minimal APIs with .NET 10, comparing SSE to SignalR and providing a practical example.
A guide to creating generic C# helper methods with enum constraints for reading Description attributes in .NET.
A guide to parsing Markdown files with YAML frontmatter into strongly-typed C# objects for use in ASP.NET Core applications.
Explains how to avoid unnecessary closure allocations when using ConcurrentDictionary.GetOrAdd in C# for better performance and concurrency.
Explains how to handle large cookies in ASP.NET Core by chunking them using the ChunkingCookieManager to overcome the 4kb size limit.
Explores using the Vogen library in C# to create value objects, improving code clarity and reducing errors by constraining primitive types.
Explains how to initialize ASP.NET Core TagHelpers with shared data using the ITagHelperInitializer interface for performance and consistency.
A developer shares their implementation of a custom numeric string comparer in .NET, handling edge cases like movie sequels and version numbers.
A guide to automating .NET documentation using Astro, Starlight, and MarkdownSnippets to keep code samples in sync.
A tutorial on using Alpine.js to create a reactive UI that polls an ASP.NET Core API for real-time data updates.
A tutorial on building a persistent counter using Alpine.js, demonstrating client-side state management with local storage.
Learn how to implement dynamic, Htmx-powered 'islands' in ASP.NET Core for blending static page performance with user-specific content.
A tutorial on using Htmx triggers with ASP.NET Core to dynamically update HTML elements, specifically focusing on refreshing a user avatar.
A guide on managing Entity Framework Core migrations during development within .NET Aspire distributed applications.
A guide to reliably testing Htmx-powered ASP.NET Core applications using Playwright by leveraging Htmx lifecycle events.
A guide to implementing the 'intersperse' method in C# as an extension for IEnumerable, inspired by JavaScript libraries.
Explains how unchecked arithmetic in .NET can cause integer overflow, using a Fibonacci sequence example, and discusses how to prevent it.
A tutorial on enhancing Htmx web applications by replacing default confirmation dialogs with custom SweetAlert popups for better user experience.
Explains how to use the ActivatorUtilitiesConstructor attribute in .NET to control which constructor is selected during dependency injection.
Explains how to add properties to the Program class in C# top-level statements using partial classes for cleaner console apps.