The .NET Stacks, #28: The future of MVC and themes of .NET 6

This week, we look at the future of APIs in ASP.NET Core MVC and the "themes" of .NET 6.

Dave Brock
Dave Brock

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

Happy Monday to all. This week, we’ll be discussing:

  • The future of ASP.NET Core MVC APIs
  • Check out the “themes” of .NET 6
  • .NET Q&A: Not the Overflow you’re looking for
  • Last week in the .NET world

The future of ASP.NET Core MVC APIs

This week, David Fowler stopped by the ASP.NET community standup to talk about ASP.NET Core architecture. As you’d expect, it was quite informative. We learned how the team is addressing MVC, ASP.NET Core’s exception to the rule.

As ASP.NET Core has kept an eye on lightweight and modular services, MVC isn’t exactly a shining example of this concept. As with a lot of Microsoft tech, there are a lot of historical reasons for this—when thinking about MVC for ASP.NET Core, a lot of time was spent merging APIs and MVC web bits into one platform so performance analysis wasn’t given the light of day.

If you develop APIs with MVC, then, you’re paying a lot up front. When a lot of use cases are using it for CRUD operations over HTTP, do you need all the extension filters, formatters, and so on? Why pay for all of MVC if you aren’t using it? As said in the standup, we’re now looking at a “framework for framework authors” where all the abstractions aren’t used by 99% of developers.

Fowler and team are working on something called “Project Houdini”—an effort to “make MVCs disappear.” Don’t worry, MVC will always be around, but the effort revolves pushing MVC productivity features to the core of the stack, and not being a special citizen. Along the way, performance should improve. Fowler showed off a way to generate imperative APIs for you at compile time using source generation (allowing you to keep the traditional MVC controller syntax).

As a result, you’re shipping super-efficient code much closer to the response pipe. And when AOT gets here, it’ll benefit from runtime performance and treeshaking capabilities. Stay tuned: there’s a lot to wrap your head around here, with more information to come.

Check out the “themes” of .NET 6

It’s a fun time in the .NET 6 release cycle—there’s a lot of design and high-level discussions going on, as it’ll be 11 months before it actually ships. You can definitely look at things like the .NET Product Roadmap, but .NET PM Immo Landwerth has built a Themes of .NET site, which shows off the GitHub themes, epics, and stories slotted for .NET 6. (As if you had to ask, yes, it’s built with Blazor.)

As Immo warns, this is all fluid and not a committed roadmap—it will change frequently as the team’s thinking evolves. Even at this stage, I thought it was interesting to filter by the Priority 0 issues. These aren’t guarantees to make it in, but it is what the team currently is prioritizing the highest.

📲 With Xamarin coming to .NET 6 via MAUI, there’s predictably a lot of Priority 0 work outlined here—from managing mobile .NET SDKs, improving performance, and using .NET 6 targets.

🏫 I’m happy to see an epic around appealing to new developers and students, and there are epics around teaching entire classes in .NET Notebooks in VS Code and making setup easier. They’re also prioritizing democratizing machine learning with stories for using data when training in the cloud and better data loading options.

🌎 Blazor developers are anxious for enabling ahead-of-time (AOT) compilation, with stories around compiling .NET apps into WASM and AOT targeting.

✅ Acknowledging carryover from .NET 5 promises, there are stories for building libraries for HTTP/3 and confidently generating single file apps for supported target platforms. There’s also more on app trimming planned, especially when using System.Text.Json.

📈 As promised, a lot to improve the inner-loop performance—plans for the BCL to support hot reloading (and for Blazor to support it), improving MSBuild performance, and an improved experience for Xamarin devs.

There’s so much to look through if you’ve got the time, and things are going to move around a lot—there’s a ton of XL-sized Priority 0 issues, for example—but it’s always nice to geek out.

Microsoft Q&A for .NET: Not the Overflow you’re looking for

This week, Microsoft announced Microsoft Q&A for .NET. The Q&A experience, a replacement for Microsoft’s older forum platforms like MSDN and TechNet, was first rolled out last October (and went GA in May 2020). The inevitable question: “Why not just use and/or buy Stack Overflow?” I find it interesting that this week’s post didn’t mention what every developer was thinking, but I’ve explored Microsoft’s thoughts from last year:

We love Stack Overflow. We will continue supporting our customers who ask questions there. In the future, we will introduce a feature that points askers on Microsoft Q&A to relevant answers from Stack Overflow … However, Stack Overflow has specific criteria about what questions are appropriate for the community and Microsoft Q&A will have a more open policy regarding this. More importantly, via Microsoft Q&A we can create unique experiences that allow us to provide the highest level of support for our customers.

In Microsoft’s defense, the line “I see too many questions on SO that I believe are viable in any normal support scenario, but get closed and downvoted because people didn’t follow the rules” is all too familiar. There’s a lot of value in a Microsoft-focused platform centered around answers, not reputation.

In addition, Microsoft is looking to own the experience with additional support channels, badges, and integration with other Microsoft services. I don’t think Stack Overflow is getting nervous—the Q&A UX is similar to the MSDN forums, and that’s not a compliment—but the platform is there if you want to try it. I’ll be curious to see how it evolves.

🌎 Last week in the .NET world

🔥 The Top 3

📢 Announcements

📅 Community and events

A light week because of the US Thanksgiving Holiday, so just one community standup—for ASP.NET, David Fowler joins to talk about ASP.NET Core architecture.

😎 ASP.NET Core / Blazor

🚀 .NET 5

⛅ The cloud

📔 Languages

🔧 Tools

📱 Xamarin

🎤 Podcasts

.NET Stacks