<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Adventures in .NET</title><link>https://blog.joelving.dk/</link><description>Recent content on Adventures in .NET</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 30 Jun 2024 22:22:00 +0200</lastBuildDate><atom:link href="https://blog.joelving.dk/index.xml" rel="self" type="application/rss+xml"/><item><title>Async isn't always async</title><link>https://blog.joelving.dk/2024/06/async-isnt-always-async/</link><pubDate>Sun, 30 Jun 2024 22:22:00 +0200</pubDate><guid>https://blog.joelving.dk/2024/06/async-isnt-always-async/</guid><description>This is a long story about me recalling some of the finer details about how async-await works in dotnet, notably how a function returning a Task can execute synchronously.
With thanks to Stephen Toub, who is the reason I did not waste more time on this than I did - and apologies for what is probably going to be an embarassing mix-up of terms.
TL;DR Async-await is smart. If you call an async method that returns a task that is completed from the start, the caller won&amp;rsquo;t schedule the remainder of it&amp;rsquo;s execution as a continuation but continue synchronously.</description></item><item><title>One year an architect</title><link>https://blog.joelving.dk/2024/05/one-year-an-architect/</link><pubDate>Wed, 01 May 2024 12:30:00 +0200</pubDate><guid>https://blog.joelving.dk/2024/05/one-year-an-architect/</guid><description>Today marks the one-year anniversary of me stepping into a formal architecture role from that of a backend developer, and I&amp;rsquo;d like to reflect a bit on what I&amp;rsquo;ve learned during that time.
Please bear in mind, I work out of a centralized architecture office - the infamous ivory tower - so these learning are probably mostly relevant in similar organization setups - and you (well, your boss&amp;rsquo;s boss, probably) should work hard to change it1.</description></item><item><title>Reusable UI and Interchangable hosting models in Blazor</title><link>https://blog.joelving.dk/2020/02/reusable-ui-and-interchangable-hosting-models-in-blazor/</link><pubDate>Tue, 11 Feb 2020 10:00:00 +0200</pubDate><guid>https://blog.joelving.dk/2020/02/reusable-ui-and-interchangable-hosting-models-in-blazor/</guid><description>Tl;dr: Enable clean and easy changing of hosting model of Blazor app by packaging your UI in a Razor Class Library and using inversion of control to provide hosting model-specific data providers to your views. In a Blazor WASM client project, implement the service using an HttpClient accessing an API. In a Blazor ServerSide (or during prerendering), implement the service using more direct access.
Source code is available at https://github.com/joelving/blazor-hosting.</description></item><item><title>Reinventing time reporting with modern .NET - part 2</title><link>https://blog.joelving.dk/2018/11/reinventing-time-reporting-modern-dot-net-part-2/</link><pubDate>Wed, 14 Nov 2018 15:30:00 +0200</pubDate><guid>https://blog.joelving.dk/2018/11/reinventing-time-reporting-modern-dot-net-part-2/</guid><description>This post is part of a series exploring some of the newest features of .Net. Last time we looked at how we can use pipes for parsing stream-data with very little overhead. We used it to built our own minimal iCal-parser, to be used in a remake of a time reporting tool for contractors like myself.
In this installment, we&amp;rsquo;ll add a background queue and processor to decouple the fetching and parsing from our web interface.</description></item><item><title>Reinventing time reporting with modern .NET - part 1</title><link>https://blog.joelving.dk/2018/10/reinventing-time-reporting-modern-dot-net-part-1/</link><pubDate>Mon, 08 Oct 2018 12:00:00 +0200</pubDate><guid>https://blog.joelving.dk/2018/10/reinventing-time-reporting-modern-dot-net-part-1/</guid><description>It&amp;rsquo;s a wonderful time to be a .NET-developer. The .NET Core-team and so many others in the community is doing absolutely marvelous work reinventing the platform. As a web dev, I&amp;rsquo;m inundated with cool new toys to try out - many more than I can get around to: Pipe, Span&amp;lt;T&amp;gt;, Memory&amp;lt;T&amp;gt; for near-zero-allocation byte massaging; IHostedService for running background tasks along your website; typed HttpClient, SocketMessageHandler and Polly for making Http even more manageable; SignalR for real-time communication; Blazor for frontends in C#.</description></item></channel></rss>