-
Notifications
You must be signed in to change notification settings - Fork 647
FAQ
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.
.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.
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.
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.
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.
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
Yes, a Blazor application can be deployed as a set of static files without the need for any .NET support on the server.
Yes! Blazor optionally integrates with ASP.NET Core to provide a seamless and consistent full-stack web development solution.
Blazor is inspired by existing modern single page app frameworks, like React, Angular, and Vue, but is also a new framework in its own right.
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.
Blazor is an experimental project because there are still lots of questions to answer about its viability and appeal. The purposes of this initial experimental phase is to work through the any outstanding technical issues, to gauge interest and to listen to feedback. While we are optimistic about Blazor's future, at this time Blazor is not a committed product and should be considered pre-alpha.
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.
No, Blazor is a web framework based on HTML, CSS, and other standard web technologies.
Yes, WebAssembly has achieved cross-browser consensus and all modern browsers now support WebAssembly
Yes, modern mobile browsers also support WebAssembly.
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.
Yes, Blazor applications can call into JavaScript through JavaScript interop APIs.
You can access the DOM through JavaScript interop from .NET code. However, Blazor is a component based framework that minimizes the need to access the DOM directly.
Blazor makes heavy use of Razor, a markup syntax for HTML and C#. Browser + Razor = Blazor! When pronounced, it is also the name of a swanky jacket worn by hipsters that have excellent taste in fashion, style, and programming languages.