Blazor is a new DOT NET web framework for building client applications using C # / Razor and HTML-enabled browser with WebAssembly.
It can simplify the process of building a single-page program (SPA) and at the same time enable full web development using .NET.
- WebAssembly is developed as a web standard and is supported by all major browsers except plugins.
- It is a low-level assembly-like language with an integrated binary format that can work in modern web browsers.
- It cannot be read/written by humans but we can integrate code from other languages into WebAssembly to facilitate their operation in the browser.
Benefits of using .NET to build a client app:
- A range of APIs and tools for all stable and easy-to-use platforms.
- Modern languages such as C # and F # offer many features that make programming easier and more interesting for developers.
The availability of excellent IDE in the form of Visual Studio provides an excellent .NET development experience on many platforms such as Windows, Linux, and macOS.
- Features such as speed, performance, security, distribution, and reliability in web development that make complete stack development easier.
- Microsoft has described Blazor as a pilot project and as it is in the alpha phase (as of today March 30, 2018) therefore it should not be used in the manufacturing environment.
- Blazor runs on all browsers and fully supports .NET standards without any extra plugin.
- Blazor is fast, has reusable components.
- Blazor is open source with great support from the community,
Blazor also supports features of the SPA framework such as:
- Server-side rendering
- Build on save during development
- Forms and validation
- Dependency Injection
.NET Core 2.1 Preview 2 SDK
Visual Studio 2017 (15.7)
Below Visual Studio 2017 v15.7 it is not supported.
Create a Blazor framework project:
- Install “ASP.NET Core Blazor Language Services extension”.
- Open Visual Studio then select File >> New >> Project.
- Then select .NET Core inside the Visual C# menu from the left panel. Then, select “ASP.NET Core Web Application”.
- In the two drop-down menus at the top left of the template window. Select “.NET Core” and “ASP.NET Core 2.0” from the dropdowns. Then, select the “Blazor” template.
- Execute the program