ASP.NET Core Dev Team Launches 'Blazor United' Push for .NET 8

Shortly after Blazor creator Steve Sanderson wowed web-devs with a new prototype project called Blazor United and solicited feedback on its viability, Microsoft flipped the switch and put it on the roadmap for .NET 8.

His latest pet project (which is how Blazor got started years ago) seeks to unify disparate components of the ASP.NET Core ecosystem to form a new tooling framework, borrowing tech from Razor Pages, MVC, CSHTML and the Blazor Server and client-side Blazor WebAssembly components.

Sanderson nine days ago unveiled Blazor United in a YouTube video titled "Blazor United prototype," wherein he summarized his project: "We've started some experiments to combine the advantages of Razor Pages, Blazor Server and Blazor WebAssembly all into one thing, so this would be a way for Blazor components to be a single architecture for all your web UI scenarios -- that's for plain HTML rendering and for full interactivity either server-side or on WebAssembly -- and that's all in one project with the ability to easily switch between different rendering modes and even mix them in the same page." (See the Visual Studio Magazine) article, "Steve Sanderson Wows Web-Devs with Peek at 'Blazor United' for .NET 8.")

In the video, described as "A quick peek at some of the cool Blazor prototypes we're experimenting with for .NET 8," he also asked for feedback on whether Blazor United seemed relevant to developers and what their scenarios and priorities would be. He further said the team was serious about doing something at least like Blazor United for .NET 8, coming in November.

Feedback was received -- "it's good" -- and now Blazor United is in the ASP.NET Core Roadmap for .NET 8.

In fact, over the past few days, 11 separate Blazor United issues were added to the roadmap on GitHub, ranging from a security review to rendering Blazor Server and Blazor WebAssembly components into a page.

ASP.NET Core Roadmap for .NET 8
[Click on image for larger view.] ASP.NET Core Roadmap for .NET 8 (source: Microsoft).

As far as that feedback, it was generally good, with the first comment received stating: "My only comment is 'yes please, in full'. In one stroke this demo answers a bunch of wish-list items I have for the future of how best to render my web app and to integrate it within a broader website. Achieving the results shown in the demo in that or a similar manner would be a wonderful result."

Another comment said: "Loved the demo and got goose bumps when say how easy it was to switch the rendring modes without losing the component based design of blazor. But would it ve possible to dynamically switch from server to wasm mode as soon as wasm binaries all download in Auto mode?"

But it wasn't all positivity, as one commenter said in part: "First, Blazor is amazing and the ability to make Blazor pages routable is awesome! However, as a developer that's done Razor Pages and Blazor I prefer creating templates with Razor Pages because I find them way more easy to maintain and create. And that's mostly due to tag helpers. For now, I prefer to stick to simpler Razor Pages with a small amount of client-side behavior, I avoid Blazor for larger apps because I find Blazor too difficult to create a lot of pages and too difficult to maintain."

There was also plenty of discussion about the video on Reddit, where the response was mostly positive ("Oh my god. This is glorious! I hope they can make it to .NET 8," reads the first comment when sorted by "Best" comments). Visual Studio Magazine readers were also impressed, with comments like "Love it" and "Amazing."

We asked Blazor developer and author Chris Sainty for his thoughts on the project, and he was also enthusiastic.

"I'm excited for Blazor United for a couple of reasons," Sainty told Visual Studio Magazine. "First, it looks like it will allow us to get over some of the major trade-offs with using either Blazor WebAssembly or Blazor Server. With Blazor Wasm, the main issue has always been the time to download the app and get it running--we do need to fetch an entire .NET runtime after all. With Blazor Server, the issue has been the need for a constant connection via SignalR and the scaling issues that presents.

"This ability to mix hosting models has been something people have been asking for since the very early days of Blazor."

-- Chris Sainty, Blazor developer and author

"The auto mode, demoed by Steve, shows the ability to use Blazor Server for the initial load of a page giving a near immediate startup, while loading the WebAssembly assets in the background. On subsequent visits the WebAssembly model is used removing the need for the persistent connection. This ability to mix hosting models has been something people have been asking for since the very early days of Blazor.

"The second thing that excites me is the ability to just have traditional server rendered pages using the Blazor programming model. For me, this makes MVC and Razor Pages obsolete, as developers will be able to use Blazor for any type of web application going forward. I know not everyone will like this, but I wish Microsoft would retire MVC and Razor Pages and just move forward with Blazor as the singular model for building Web-based UI on the Microsoft stack. It would make getting into the ecosystem so much less confusing to new developers. When you also throw in Blazor Hybrid, developers could spend the time learning one programming model and build web, desktop and mobile UI."

In fact, the project seems to fulfill a lot of developer wants, and like Sainty said, they've been asking for a similar thing for years (see the GitHub issue, Blazor: Combine server and client to get the best of two worlds from August 2021).

The project can be tracked in the Blazor United branch of the ASP.NET Core GitHub repo.

So stay tuned for updates on how the project is progressing, as Sanderson indicated preview releases would be forthcoming if it gained traction at Microsoft. Which it has.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube