Razor is "an ASP.NET programming syntax used to create dynamic Web pages with ... C# or Visual Basic .NET."
"Blazor enables full stack Web development with the stability, consistency, and productivity of .NET," Microsoft's Daniel Roth announced in a post yesterday. "While this release is alpha quality and should not be used in production, the code for this release was written from the ground up with an eye towards building a production quality Web UI framework."
According to its GitHub site, Blazor will have all the features of a modern Web framework, including:
- A component model for building composable UI
- Forms and validation
- Dependency injection
- 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
While not there yet, Roth explained the Blazor team is already making progress on many of those goals in the alpha preview.
Until then, Roth detailed how developers can get started on the project, build a simple Hello World app and provide feedback to the team. This requires: the installation of the .NET Core 2.1 Preview 1 SDK; the latest preview of Visual Studio 2017 (15.7) with the Web development workload; and ASP.NET Core Blazor Language Services extension from the Visual Studio Marketplace.
With all that preview technology in use, things are likely to get a bit sticky in the experimentation stages, but Roth demonstrates implementing functionality like a counter, a Todo list and more, using techniques like dependency injection, hosting the app with ASP.NET Core and running it on the Azure cloud. He also points to a more complex Flight Finder sample project on GitHub.
"This is the first preview release of Blazor," Roth concluded. "Already you can get started building component-based Web apps that run in the browser with .NET. We invite you to try out Blazor today and let us know what you think about the experience so far. You can file issues on GitHub, take our in-product survey, and chat with us on Gitter. But this is just the beginning! We have many new features and improvements planned for future updates. We hope you enjoy trying out this initial release and we look forward to sharing new improvements with you in the near future."
The alpha preview got more than one developer excited.
David Ramel is the editor of Visual Studio Magazine.