Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.
Daniel Roth edited this page Jan 26, 2018 · 20 revisions

Q: What is Blazor?

Blazor is a single page web app framework built on .NET that runs in the browser via WebAssembly. To see Blazor in action check out Steve Sanderson’s prototype demo at NDC Oslo.

Q: I'm new to .NET. What's .NET?

.NET is a free, cross-platform, open source developer platform for building many different types of applications (desktop, mobile, games, web). .NET includes a managed runtime, a standard set of libraries, and support for multiple modern programming languages: C#, F#, and VB. You can get started with .NET in 10 min.

Q: How can you run .NET in a web browser?

Running .NET in the browser is made possible by a relatively new standardized web technology called WebAssembly. WebAssembly is a "portable, size- and load-time-efficient format suitable for compilation to the web." Code compiled to WebAssembly can run in any browser at native speeds. To run .NET binaries in a web browser we use a .NET runtime (specifically Mono) that has been compiled to WebAssembly.

Q: Does Blazor compile my entire .NET based app to WebAssembly?

No, a Blazor app consists of normal compiled .NET assemblies that get downloaded and run in a web browser using a WebAssembly based .NET runtime. Only the .NET runtime itself is compiled to WebAssembly. That said, support for full static ahead of time (AoT) compilation of the app to WebAssembly may be something we add further down the road.

Q: Wouldn't the app download size be huge if it also includes a .NET runtime?

Not necessarily. .NET runtimes come in all shapes in sizes. Early Blazor prototypes used a compact .NET runtime (including assembly execution, garbage collection, threading) that compiled to a mere 60KB of WebAssembly. Blazor now runs on Mono, which is currently significantly larger, but opportunities for size optimization abound, including merging and trimming the runtime and application binaries. Other potential download size mitigations include caching and using a CDN.

Q: What features will Blazor support?

Blazor will support all of the features of a modern single page app framework:

  • A component model for building composable UI
  • Routing
  • Layouts
  • Forms and validation
  • Dependency injection
  • JavaScript interop
  • Live reloading in the browser during development
  • Server-side rendering
  • Full .NET debugging both in browsers and in the IDE
  • Rich IntelliSense and tooling
  • Ability to run on older (non-WebAssembly) browsers via asm.js
  • Publishing and app size trimming

Q: Does Blazor work with ASP.NET Core?

Yes! Blazor integrates with ASP.NET Core to provide a seamless and consistent full-stack web development solution.

Q: Can I use Blazor without running .NET on the server?

Yes, a Blazor application can be deployed as a set of static files without the need for any .NET support on the server.

Q: Is Blazor a .NET port of an existing JavaScript framework?

Blazor is inspired by existing modern single page app frameworks, like React, but is also a new framework in its own right.

Q: How can I try out Blazor?

Blazor is currently an experimental project and in the early stages of development. While we hope to have something that you can download and install soon, there isn't a download available at this time. If you’re keen, you can clone the repo, build it, and run the tests.

Q: Why is Blazor an "experimental" project?

Blazor is an experimental project because there are still lots of questions to answer about it's viability and appeal. While we are optimistic about Blazor's future, at this time Blazor is not a committed product and should be considered pre-alpha. The purposes of this initial experimental phase is to work through the any outstanding technical issues, to gauge interest and to listen to feedback.

Q: Is this Silverlight all over again?

No, Blazor is a .NET web framework based on HTML and CSS that runs in the browser using open web standards. It requires no plugin and works on mobile devices and older browsers.

Q: Does Blazor use XAML?

No, Blazor is a web framework based on HTML, CSS, and other standard web technologies.

Q: Is WebAssembly supported in all browsers?

Yes, WebAssembly has achieved cross-browser consensus all modern browsers now support WebAssembly

Q: Does Blazor work on mobile browsers?

Yes, modern mobile browsers also support WebAssembly.

Q: What about older browsers that don't support WebAssembly? For example, does Blazor work in IE?

For older browsers that don't support WebAssembly Blazor will fallback to using an asm.js based .NET runtime. Using asm.js is slower and has a larger download size, but is still quite functional.

Q: Don't you need features like garbage collection and threading added to WebAssembly to make this work?

No, WebAssembly in its current state is sufficient. The .NET runtime handles its own garbage collection and threading concerns.

Clone this wiki locally