News

ASP.NET Core, .NET MAUI Updated as .NET 9 Nears

The web-dev ASP.NET Core framework and Xamarin.Forms' successor .NET MAUI received the lion's share of dev attention in the seventh preview of .NET 9 as Microsoft preps for a November launch at .NET Conf 2024.

Other enhancements were made across the board, affecting the .NET Runtime, SDK, libraries, C#, Blazor and more.

For ASP.NET Core, the release notes include an item to advance SignalR support for trimming and Native AOT, part of Microsoft's Native AOT journey.

The company says Native AOT apps provide these benefits:

  • Minimized disk footprint: When publishing using Native AOT, a single executable is produced containing just the code from external dependencies that is needed to support the program. Reduced executable size can lead to:
    • Smaller container images, for example in containerized deployment scenarios.
    • Reduced deployment time from smaller images.
  • Reduced startup time: Native AOT applications can show reduced start-up times, which means:
    • The app is ready to service requests quicker.
    • Improved deployment where container orchestrators need to manage transition from one version of the app to another.
  • Reduced memory demand: Native AOT apps can have reduced memory demands, depending on the work done by the app. Reduced memory consumption can lead to greater deployment density and improved scalability.
Native AOT Has Lower App Size, Memory Usage, and Startup Time.
[Click on image for larger view.] Native AOT Has Lower App Size, Memory Usage, and Startup Time. (source: Microsoft).

The aforementioned Native AOT journey has been years in the making, as a survey long ago indicated Native AOT was an important consideration for many developers who indicated its absence was holding back .NET adoption.

Does the lack of officially supported native AOT option prevent you from using .NET more?
[Click on image for larger view.] "Does the lack of officially supported native AOT option prevent you from using .NET more?" (source: Microsoft).

"We've enabled trimming and Native AOT support for both SignalR client and server scenarios," the release notes say. "You can now take advantage of the performance benefits of using Native AOT in apps that use SignalR for real-time web communications." On the same front: "The new built-in OpenAPI support in ASP.NET Core now also supports trimming and Native AOT."

The release notes for .NET MAUI (.NET Multi-platform App UI), meanwhile, introduce HybridWebView, which lets devs host arbitrary HTML/JS/CSS content in a WebView, enabling communication between JavaScript code in the WebView and its hosting code, which is C#/.NET. "For example, if you have an existing React JS application, you could host it in a cross-platform .NET MAUI native application, and build the back-end of the application using C# and .NET," devs are informed.

The overall focus of .NET MAUI in .NET 9 is to improve product quality, Microsoft said, by expanding test coverage, end-to-end scenario testing and bug fixing.

A raft of other relatively minor tweaks and fixes were made in Preview 7 as the dev team readies for the final push, which is likely to see only two more preview releases before the launch at .NET Conf 2024 on Nov. 12.

More on all of those changes can be found in a blog post announcing the preview and a GitHub discussion set up for the preview in which developers interact with Microsoft maintainers like James Montemagno.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube