As you might agree, the current trend for us as developers is to become full-stack. If you’re a back-end developer, it could be challenging to keep up with learning JS frameworks. So, when I heard about Microsoft releasing this new member of the ASP.NET family named Blazor, I felt really excited.
In the next section, I’ll try to give an overview of what Blazor is about.
What is Blazor?
With Blazor you’re able to create an app composed of reusable components implemented using C#, HTML, and CSS.
How Blazor can run client-side C#?
Blazor comes in two flavors:
With Blazor server, the components are processed in the server, not in the client. The UI updates and client events are managed/handled by a mechanism that uses a SignalR connection to work.
The client-side C# code is run directly on the browser by using Web Assembly.
What do I need to get started with Blazor?
You need to install the latest .NET Core 3.0 SDK release.
If you’re using Visual Studio, you only need to follow the process to create a new project, select Blazor App, and then choose the Blazor Server App Template.
If you want to use the .NET Core CLI, you can use the following command:
dotnet new blazorserver -o WebApplication1
As mentioned in previous sections, only Blazor Server is supported on .NET Core 3.0. If you want to work with Blazor Web Assembly, you need to install .NET Core 3.1 Preview SDK.
Blazor Server Template example
I created a repository that contains an empty Blazor Server project just to give you an idea of how it looks like. It was created with Visual Studio using the Blazor Server App template.
Blazor is still on its early stages, but it seems to be a very promising approach for back-end developers that are already familiar with C#, so they can move to the front-end side of development without having to learn a JS framework.
Do you think Blazor will help Dot Net developers forget about learning JS Frameworks? Please let me know what you think in the comments section.
Roth, Daniel, and Luke Latham. “Introduction to ASP.NET Core Blazor.” Introduction to ASP.NET Core Blazor, 12 Apr. 2019, https://docs.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-3.0.