News

So Why Doesn't Microsoft Provide Its Own Blazor Component Library?

Did you ever wonder why Microsoft doesn't provide a component library for Blazor, its red-hot ASP.NET Core framework for creating web apps primarily with C# instead of JavaScript?

A component in Blazor is a portion of UI, such as a page, dialog or data entry form, Microsoft says. So they're especially crucial to client-side development with Blazor WebAssembly, wherein C# is compiled into an assembly-like target.

So Blazor components are typically used to present UI constructs such as data grids, charts, forms and so on. The basic incremental counter component, for example, looks like this:

@page "/counter"

<h1>Counter</h1>

<p>Current count: @currentCount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me!</button>

@code {
    private int currentCount = 0;

    private void IncrementCount()
    {
        currentCount+=1;
    }
}

which looks like this:

The Blazor Counter
The Blazor Counter

Prebuilt components are useful because they can be nested, reused and shared among projects.

But unlike many other frameworks that come with their own components, Blazor developers basically have the options of creating their own components, using free open source components or buying components from third-party vendors.

The reason why Microsoft doesn't provide a component library for Blazor was revealed this week in the comments section of a blog post authored by Microsoft's Blazor lead, Daniel Roth, who penned a post about ASP.NET Core updates in .NET 6 Preview 7.

A developer commented that he would need several things in order to become comfortable using Blazor in products and projects, including:

"A good component library officially supported by MS, like Angular Material is supported by the Angular team. There are a couple of component projects out there, but they are just too young/unstable to be used in large projects/products."

Here's how Roth, principal program manager, ASP.NET, replied:

We have avoided building our own component library into Blazor because we want to leave space for the community to innovate and instead focus our efforts on improving the framework.

There are component library offerings from a variety of component vendors including Telerik, DevExpress, Syncfusion, Infragistics, GrapeCity, and jQWidgets.

There are also a variety of free open source offerings including Radzen, MudBlazor, MatBlazor, Blazorise, Blazored, and others. There are now also Blazor component wrappers for the official Fluent UI web components.

Indeed, regarding that last sentence, a three-year-old GitHub issue on the ASP.NET Core repo proposed "Official Microsoft Fluent Design components for Blazor," which was just closed in June. It resulted in the microsoft/fast-blazor GitHub repo, which "provides a lightweight set of Blazor component wrappers around Microsoft's official FluentUI Web Components."

So that's the answer to the question: Microsoft is keeping its internal dev team focused on improving Blazor itself and leaving the component library business mostly to others.

Blazor Components in the Visual Studio Marketplace.
[Click on image for larger view.] Blazor Components in the Visual Studio Marketplace.

It looks like there's a pretty healthy Blazor component ecosystem already, judging from the above list of third-party vendors, a GitHub search and a Visual Studio Marketplace search (partial results shown in the graphic above; not all results specifically fit the search).

Time will tell if Microsoft will get into the component library game once its developers have polished up Blazor.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events