The .NET Stacks #26: .NET 5 has arrived, let's party

This week, we look at the .NET Conf content and also discuss the buzz around dependency injection.

Dave Brock
Dave Brock

Note: This is the published version of my free, weekly newsletter: The .NET Stacks—originally sent to subscribers on November 16, 2020. Subscribe at the bottom of this post to get the content right away!

Happy Monday, everybody! I hope you have a wonderful week. We’ll be covering a few things this morning:

  • .NET 5 has arrived
  • Dependency injection gets a community review
  • Last week in .NET world

🥳.NET 5 has arrived

Well, we made it: .NET 5 is officially here. This week, Microsoft showed off their hard work during three busy days of .NET Conf—and with it, some swag including my new default Visual Studio Code theme. I’m starting to wonder if overhyping Blazor is possible—as great as it is, I wish Microsoft would dial it back a bit.

Anyway: we’ve spent the better part of six months discussing all the updates (like, my favorite things, Blazor’s readiness, the support model, what’s happening to .NET Standard, EF Core 5, app trimming, System.Text.Json vs. Newtonsoft, and so much more).

I know you’re here for the .NET Conf links—so let me be of service. You can see all the talks from this YouTube playlist, but the highlights are below.

From the Microsoft perspective, we had the following sessions:

From the community:

💉 Dependency injection gets a community review

During the day job, I’ve been teaching infrastructure engineers how to code in C#. With plenty of experience with scripting languages like PowerShell, explaining variables, functions, and loops isn’t really a big deal. Next week, however, I’ll have to discuss dependency injection and I’m not looking forward to it. That’s not because they won’t understand it, because they’re very smart and they definitely will (eventually). It’s because it’s a head-spinning topic to beginners but is essential to learn because ASP.NET Core is centered around it.

If you aren’t familiar with dependency injection, it’s a software design pattern that helps manage dependencies towards abstractions and not lower-level implementation details. New is glue, after all. In ASP.NET Core, we use interfaces (or base classes) to abstract dependencies away, and “register” dependencies in a service container (most commonly IServiceProvider in the ConfigureServices method in a project’s Startup class). This allows us to “inject” services (or groups of services) only when we need them.

Right on cue, this week’s edition of .NET Twitter Drama included the discussion of a Hacker News article criticizing the ASP.NET Core DI practice as overkill. The article mirrors a lot of HN: .NET rants with some valuable feedback nested inside.

In my experience, DI in general is a difficult concept to learn initially but sets you up for success for maintaining loose coupling and testability as your project matures. However, the initial ceremony can drive people away from ASP.NET Core as developers can view it as overkill if they think their project will never need it.

I do think the conversation this week helped folks understand that working with settings is very ceremonial and can lead to confusion (just look at the options pattern). This might foster .NET team discussions about doc updates and how to provide a better experience when working with configuration. A boy can dream, anyway.

🌎 Last week in the .NET world

🔥 The Top 3

📢 Announcements

📅 Community and events

With .NET Conf, no community standups so a light section except: The .NET Docs Show codes a drone with Bruno Capuano.

🚀 .NET 5

😎 ASP.NET Core / Blazor

⛅ The cloud

📔 Languages

🔧 Tools

📱 Xamarin

🎤 Podcasts

🎥 Videos

.NET Stacks