Skip to content

Blazor has gotten progressively less approachable since .NET 7 #60236

Closed
@matt-goldman

Description

@matt-goldman

I want to start by saying that I appreciate the work that has gone into evolving Blazor. The framework has introduced a number of powerful new capabilities, especially with render modes in .NET 8 and further refinements in .NET 9. However, I believe that Blazor has been moving away from one of its core strengths: simplicity.

Since .NET 7, Blazor seems to be heading in a more complex direction, largely due to architectural changes introduced to support new render modes. While these features are valuable for certain advanced scenarios, my concern is that they have led to a reworking of how Blazor is structured, making tasks that were previously simple unnecessarily difficult.

Choosing between WASM and Server used to be a straightforward choice you would make based on the needs of your app. Now, the template names obfuscate this choice, as well as introducing additional restrictions and inconsistencies. Options that used to be available across all templates are tied to specific render modes, leaving developers to manually re-implement functionality that was once universal.

I suspect that the majority of Blazor users don’t need render modes. They need either WASM or server, and that used to be straightforward. Now, the entire template system and authentication model have been refactored to accommodate a smaller percentage of users, making it harder for the majority to build and deploy Blazor applications.

Some key concerns:

  • Authentication has become unnecessarily complex. Previously, Blazor had a relatively straightforward way to handle auth, but now, because of render modes, the process feels more convoluted.
  • The default templates have been restructured in a way that forces developers to deal with complexity they may not need. Instead of simply documenting how to enable advanced scenarios, the entire framework has shifted to accommodate them by default.
  • Blazor’s core value proposition - making it easy for .NET developers to build front-end applications - feels less prominent in recent releases. What used to be a simple alternative to JavaScript-heavy front-end frameworks now requires arcane knowledge to implement things that were previously straightforward.

I’m not arguing that features like render modes shouldn’t exist, I recognise their utility for specific use cases. However, I do believe that they should be opt-in, rather than the default structure that dictates how all Blazor projects are now built, especially given the impact they have on everything else.

If the goal is to make Blazor more powerful, that’s great; but shouldn’t that come as an option for those who need it, rather than forcing that complexity onto everyone?

Most of us just want to build web apps, and one of Blazor’s biggest strengths was how easy it made that. Now, instead of focusing on building great applications, we have to navigate added complexity and specialised knowledge that’s only relevant for a small subset of use cases.

I’d love to hear from other Blazor developers on this. Do you feel that Blazor has become unnecessarily complex? Would reverting to something closer to the .NET 7 templates (with the option to enable advanced features when needed) be beneficial for the majority?

Looking forward to hearing others’ thoughts! And absolutely keen to be put in my place if I'm in the minority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions