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

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube