The .NET Stacks, #28: The future of MVC and themes of .NET 6
Dave Brock
Posted on December 5, 2020
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 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
- Andrew Lock applies the MVC design pattern to Razor Pages.
- Khalid Abuhakmeh introduces Entity Framework Core 5.
- Rick Strahl warns against .NET Core runtime bitness for IIS installs when upgrading to .NET 5.
📢 Announcements
- Jayme Singleton wraps up .NET Conf 2020.
- James Montemagno announces Microsoft Q&A for .NET.
- Maoni Stephens writes about the new GetGCMemoryInfo API in .NET 5.
- Klaus Loeffelmann writes about VB WinForms apps in .NET 5 and Visual Studio 16.8.
- Tara Overfield provides a .NET Framework November 2020 update.
- Azure Pipelines is replacing the “View YAML” experience.
📅 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
- Dave Brock isolates and test service dependencies in Blazor.
- Ricardo Peres works with inline images in ASP.NET Core and also pitfalls of DI lifetime validation in ASP.NET Core.
- Shaun C. Curtis runs Blazor WASM and Server in a single project on a single site.
- Khalid Abuhakmeh writes about JS isolation, modules, and dynamic C# with Blazor.
- Jason Farrell uses scoped dependencies in ASP.NET Core.
- Imar Spaanjaars improves his ASP.NET Core site’s e-mail capabilities.
- Marinko Spasojevic writes about Blazor CSS isolation and also works with custom validation in Blazor WebAssembly.
- David Hayden generates a client for ASP.NET Core Web API using OpenAPI.
- David Grace writes about four useful tips when using the xUnit Test Server in ASP.NET Core.
🚀 .NET 5
- Alex Yakunin provides more updates on his performance improvements working with .NET 5.
- Rick Strahl upgrades his apps and libraries to .NET 5.
- Davide Benvegnù talks about why .NET 5 is perfect for DevOps.
- Scott Hanselman makes a self-contained WinForms app with .NET 5 from the command-line.
⛅ The cloud
- Dave Brock uses Azure Functions, Azure Storage blobs, and Cosmos DB to copy images from public URLs.
- Adrian Hall announces Azure Mobile Apps v4.2.0 for .NET.
- Tim Sander writes about the difference between null and undefined in Azure Cosmos DB.
- Mark Heath writes about Azure Durable Entities.
- AWS had an outage, and an interesting writeup about it.
📔 Languages
- Gergely Sinka installs .NET Core apps on Linux in 5 minutes.
- Thomas Levesque continues writing about C# 9 records as strongly-typed IDs.
- Johnson Manohar writes about 4 steps to export Excel files to JSON using C#.
- Vladimir Khorikov uses C# 9 records as DDD value objects.
- Khalid Abuhakmeh consumes SOAP APIs in .NET Core.
- Prashant Pathak slices in F# and writes about how it’s different in F# 5.
🔧 Tools
- Scott Hanselman shows off the Spectre.Console project.
- David Grace uses ASP.NET Core’s TestServer in xUnit.
- Matt Ward writes about NuGet support in Visual Studio for Mac 8.8.
- Jesse Liberty continues his series on Git.
- Nada Rifki writes about 9 new 2020 browser features.
📱 Xamarin
- Daniel Hindrikes works on GitHub Actions and Cake for TinyMvvm.
- Rendy Del Rosario works with background distance-based location updates on iOS.
- Charlin Agramonte simplifies bindable properties with type converters in Xamarin Forms.
- Antonio Liccardi talks about new features with Xamarin.Forms 5.0.
- Leomaris Reyes writes about what’s new in Xamarin.Essentials 1.6.
- James Montemagno enables C# 9 in Xamarin and .NET Standard projects.
- Delpin Susai Raj uses a file browser.
🎤 Podcasts
- Shawn Wildermith talks to the .NET Rocks podcast and Herding Code about his new Hello World film.
- The Stack Overflow Podcast discusses how Big Tech is getting cozy with CS departments.
- The 6 Figure Developer podcast talks to Jeremy Sinclair.
- The MS Dev Show talks to Scott Hunter about .NET 5.
- Technology and Friends talks to Omkar Naik on Microsoft Cloud for Health Care.
- The Unhandled Exception Podcast talks with Pete Gallagher about teaching kids to code.
- The Work Item podcast talks to Christos Matskas.
Posted on December 5, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.