Paul Krill
Editor at Large

Microsoft .NET 8 boosts Blazor, WebAssembly

news
May 25, 20232 mins

Microsoft works to improve web app performance with Blazor server-side rendering and streaming rendering, Blazor WebAssembly runtime improvements.

fire flames
Credit: Little Visuals

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author