Microsoft’s Blazor project runs .Net in the browser

The WebAssembly format is key to the experimental framework’s ability to deliver .Net apps

In what could be a turning point for web development, Microsoft’s ASP.Net team has launched an experimental web UI framework, called Blazor, that runs .Net in the browser via the WebAssembly portable code format.

Blazor is intended to simplify the building of fast, single-page .Net browser apps. While Blazor does use web technologies such as CSS and HTML, it uses the C# language and the Razor syntax instead of JavaScript to build a composable web UI. By providing a size- and load-time-efficient format for compilation to the web, WebAssembly lets .Net be run in the browser. Normal .Net assemblies run through a WebAssembly-based runtime. WebAsembly is supported by all major browsers and  lets compiled code run at native speeds.

Blazor runs on Xamarin’s Mono .Net runtime and executes normal .Net assemblies. To run on older browsers, it can fall back to an ASM.js runtimeusing .Net. Microsoft’s goal is to position .Net for full-stack web development, and so it offers standard .Net APIs, tools, and build infrastructure via Blazor. On the server side, .Net can enable performance and security. But Blazor is not a way to deploy existing Universal Windows Platform or Xamarim moble applications in the browser.

Microsoft stressed that Blazor is not yet a committed project; this tentative status lets the company investigate technical issues with running .Net in the browser. Microsoft plans to engage with early adopters to get feedback.

Where to download Blazor resources

Razor has a project repo but at this pointit has nothing for download. Still, developers can clone the repo, build it, and then run tests and samples. The .Net Core SDK and Node.js Version 8.3 or greater are required for builds.

Features expected for Blazor

Features planned for Blazor include:

  • A component model for building a composable UI
  • JavaScript interoperability
  • Routing
  • Layouts
  • Forms and validation
  • Dependency injection
  • Server-side rendering
  • .Net debugging