Microsoft .NET 8 boosts Blazor, WebAssembly
Microsoft .NET 8 boosts Blazor, WebAssembly
Microsoft this week fleshed out plans for its upcoming .NET 8 software development framework. For web development, .NET 8 will combine the strengths of server-side and client-side rendering with the Blazor component model.
Now available in a fourth preview, .NET 8 leverages server-side rendering with Blazor components, enhanced navigation and form handling, and streaming rendering. Streaming rendering, which streams content updates on the response stream, can improve the user experience for server-side rendered pages that need to perform long-running async tasks in order to render fully, Microsoft said.
Developers also will have the ability to add client interactivity per component or per page, and can choose a render mode at runtime. Server-side rendering and streaming rendering were made available in .NET 8 Preview 3 and .NET 8 Preview 4, respectively. The additional mechanisms will be added in upcoming previews.
With .NET 8, developers also can take a Blazor component and render it completely outside the context of an HTTP request. The component can be rendered through HTML as a string or a stream, independent of the ASP.NET Core hosting environment. This is useful for generating HTML fragments, such as an automated email. In the future, Microsoft said it would enable static site content generation for Blazor, post.-.NET 8. .NET 8 is due as a production release in November.
Microsoft also is working to improve the performance of .NET in browsers using WebAssembly. The jiterpreter in .NET 8, which offers partial JIT (just-in-time compilation) support, improves performance of the .NET WebAssembly runtime. Microsoft reports it has seen 20% faster UI rendering in benchmark tests thanks to the jiterpreter, with JSON serialization and deserialization running twice as fast. The latest WebAssembly specifications, such as SIMD for ahead-of-time compilation, along with hot reload improvements, also are being leveraged for WebAssembly.
A web-friendly new packaging format, Webcil, is featured for Blazor WebAssembly apps. Also, QuickGrid, a fast data grid component previewed in .NET 7, is being made stable in .NET 8. APIs have been added in Blazor Server to monitor activity on circuits, to potentially free up resources.