Blazor - The Future of Web Development?
What is Blazor?
Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries.
What is Blazor's purpose?
Blazor lets you build interactive web UIs using C# instead of JavaScript.
Who created it?
Microsoft.
When?
It was initially released in 2018.
Who uses it?
Blazor is part of the open-source .NET platform that has a strong community of contributors from more than 3,700 companies.
.NET is free, and that includes Blazor. There are no fees or licensing costs, including for commercial use. This of course makes it very attractive to a lot of companies.
How does it work?
Blazor can run your client-side C# code directly in the browser, using WebAssembly. Its real .NET running on WebAssembly, so you can re-use code and libraries from server-side parts of your application.
Alternatively, Blazor can run your client logic on the server. Client UI events are sent back to the server using SignalR - a real-time messaging framework. Once execution completes, the required UI changes are sent to the client and merged into the DOM. The document object model(DOM) is a programming interface that represents all elements on an HTML page as nodes in a tree structure. Using the DOM, elements can be updated, added, and removed from the page.
How does it compare to the competition – will it ever replace JavaScript?
JavaScript and other associated frameworks have been around for a long time. Although Blazor is technically very ‘young’ in the development world, it’s actually a part of ASP.NET Core which has been around for 5 years, the successor of the proprietary ASP.NET - which has been in wide enterprise use for decades!
A few points to consider:
Blazor is for .NET developers
Blazor WebAssembly bundles are larger than the JavaScript framework equivalents
JavaScript interop is supported but cumbersome
Blazor projects opt-out of JavaScript ecosystem tooling and rely on support from Microsoft
Blazor Server is quite unique in that the client-to-server communication is implicit, allowing us to quickly develop full-stack applications
Want to learn more about Blazor?
Connects are hosting a free virtual webinar about Blazor with expert speakers, you can either watch this live or playback - Check out our live recorded webinar here
Read more about Blazor on Dot Net. here and Wiki here.