The original address: devblogs.microsoft.com/aspnet/blaz…

The original author: devblogs.microsoft.com/aspnet/auth…

Published: May 19, 2020

I am pleased to announce the official launch of Blazor WebAssembly. This is a fully featured, supported version of Blazor WebAssembly that is ready for production. It is now possible to use.NET for full-stack Web development.

Let’s start

Getting started with Blazor WebAssembly is simple: just go to Blazor.net and install the latest. NET Core SDK (3.1.300 or later), which includes everything you need to build and run Blazor WebAssembly applications.

You can then create and run the first Blazor WebAssembly application by running the following program.

dotnet new blazorwasm -o BlazorApp1
cd BlazorApp1
dotnet run
Copy the code

Go to https://localhost:5001, and then * you’re done *! You have just built and run your first Blazor WebAssembly application. You have just built and run your first Blazor WebAssembly application.

To maximize the productivity of Blazor, be sure to install a supported version of Visual Studio for the platform of your choice.

  • Windows: Visual Studio 2019 16.6
  • MacOS: Visual Studio for Mac 8.6
  • Windows/macOS/Linux: Visual Studio Code with C# extensions

You can find more documentation and samples at Blazor.net.

Upgrading existing projects

If you already have an existing Blazor WebAssembly project, you can upgrade it from the 3.2.0 release candidate to the 3.2.0 official release in the following ways.

  • Update all Microsoft.AspNetCore.Com ponents. WebAssembly. * and reference to 3.2.0 System.Net.Http.Json package version.

That’s it. You’re ready.

What is Blazor WebAssembly?

If you are new to Blazor, let me introduce you to what Blazor WebAssembly is all about.

Blazor is an open source and cross-platform Web UI framework for use. NET and C# build single-page applications instead of JavaScript. Blazor builds rich interactive Web UIs based on a powerful and flexible component model. You can use a combination of.net code and Razor syntax to implement Blazor UI components: an elegant fusion of HTML and C#. The Blazor component seamlessly handles UI events, binds user input, and effectively renders UI updates.

The Blazor component can then be hosted in different ways to create your Web application. The first supported method is called Blazor Server. In Blazor Server applications, components are used. NET Core runs on the server. All UI interactions and updates are handled using a live WebSocket connection to the browser. Blazor Server applications are fast to load and simple to implement. .NET Core 3.1 LTS supports Blazor Server.

Blazor WebAssembly is now the second supported way to host Blazor components: using WebAssembly-based. NET runtime client in the browser. Blazor WebAssembly contains a suitable one implemented as WebAssembly. NET runtime, WebAssembly is a standardized network bytecode. The.NET runtime is downloaded with your Blazor WebAssembly application and runs properly directly in the browser. NET code. No plug-ins or code conversions required. Blazor WebAssembly works with all modern web browsers, including desktop and mobile. Similar to JavaScript, Blazor WebAssembly applications can run securely on the user’s device within the browser’s secure sandbox. These applications can be deployed as completely independent static web sites without any need at all. NET server components can also be used with ASP.NET Core to implement. NET’s full-stack network development, where code can be effortlessly shared with clients and servers.

The function is all ready

Blazor WebAssembly has a wealth of features to keep you productive in your next Web application project.

  • Take advantage of C#’s productivity and powerful runtime types.
  • Built on stability and maturity. NET ecosystem.
  • Easily reuse code and existing on both client and server. NET standard library.
  • Share the component model with the Blazor server application.
  • Deploy your application as a standalone static site or host it using ASP.NET Core.
  • Build progressive Web applications (PWA) with offline capabilities and native operating system integration.
  • Built-in authentication support.
  • Integrated globalization and localization support.
  • Environment-based configuration.
  • IL trim and build time precompression.
  • Full stack debugging.
  • Excellent tools with Visual Studio, Visual Studio for Mac and Visual Studio Code.

Blazor in action

Blazor WebAssembly has everything you need to build full-featured, productive Web applications. To see all of these Blazor WebAssembly features in action, check out Steve Sanderson’s On-demand BUILD course (link should go online after 12 noon Pacific time) : Implementing a Modern Web UI with Blazor WebAssembly.

Off-the-shelf components

Of course, any web application needs beautiful and feature-rich components. Our excellent partners provide various Blazor UI components that work well in any Blazor application, including the Blazor WebAssembly application.

  • Telerik
  • DevExpress
  • Syncfusion
  • Radzen
  • Infragistics
  • GrapeCity

Open source community

Blazor also has a thriving open source community and ecosystem. Community members (people like you!) We’ve built a lot of great component libraries, interop libraries, test frameworks, and so on, and made them available to you for free. Some great examples include

  • Blazored
  • Blazorise
  • MatBlazor
  • BlazorStrap
  • Ant Design Blazor
  • bUnit
  • Blazor Extensions

You can find these community projects and many others at the Awesome Blazor GitHub repo.

LTS or current version?

Blazor WebAssembly 3.2.0 is available in. A fully supported version of the.NET core support policy. Since this is the first version of Blazor WebAssembly, it is a Current version, not an LTS version; It does not inherit the LTS state of.NET Core 3.1. This means that once Blazor WebAssembly comes out with Blazor Later this year. NET 5 is released together and you will need to upgrade to. NET 5 to maintain support. We expect Blazor in.NET 5 to be a highly compatible release.

What’s next?

Now that we have released Blazor WebAssembly, we are turning our attention to Blazor WebAssembly. NET 5. We have started making Blazor WebAssembly work with Blazor WebAssembly. NET 5 compatibility work is expected to be completed in preview next month.

We are also exploring some Blazor features and improvements in.NET 5 and 6 versions. You can check out the list of core deliverables we are considering in the Blazor Roadmap for.NET 5 issue on GitHub. Please note that we think this list is ideal. While we hope to achieve all of the listed improvements, there are still many unknowns, and plans will certainly change as we move forward. We also hope to have a lot of small improvements and we will make them.

We will also continue to work with our friends in the Xamarin team to provide experimental support for building native UIs using Blazor Bindings through the Mobile Blazor Bindings project. This includes some early efforts to explore building hybrid UIs for native applications, and we hope to share more information soon.

Thank you for your attention

We would like to thank the Blazor community for all their warm support as we work towards this release. The Blazor community has contributed a great number of Blazor articles, blog posts, documentation, sample applications, libraries, books, videos, presentations, seminars, courses, meet-and-greets, feature suggestions, and feedback questions to the Blazor ecosystem, even when Blazor was in the preview phase. To everyone who helped make this release possible, thank you! We couldn’t have done it without your help.

Try Blazor today

We hope you enjoy this Blazor WebAssembly version. Go to Blazor.net today and try Blazor. We look forward to seeing what you create with it.

If you have any feedback questions about Blazor, please let us know by submitting questions on GitHub.


Translated through (www.DeepL.com/Translator) (free version)