.NET 8: what's new in the new LTS version

.NET Microsoft’s software development platform that provides a unified execution environment for building and running applications across multiple platforms. It offers an extensive set of libraries, frameworks and tools for developing desktop, web and mobile applications. The .NET Framework, launched in 2002, was intended as a complete tool for building applications for Windows and the Web using languages ​​such as C# and VB.NET.

Since then the Microsoft solution has undergone continuous evolution: first with the presentation of ASP.NET, then with the lighter version designed for mobile devices and embedded (.NET Compact Framework) to move on to .NET Core, one of the most significant developments. .NET Core is in fact a modular, cross-platform version of .NET that allowed the development and execution of applications on different platforms, including Linux and macOS. He was born at the same time ASP .NET Coreto provide a lightweight, modular, cross-platform web framework.

In our in-depth study, we saw how to create a .NET application without Visual Studio, simply by installing .NET Core.

The recent history of .NET

After the acquisition of Xamarinin 2020, .NET 5 was presented. The software united .NET Core, ASP.NET Core and Xamarin under a single umbrella with the goal of developing native applications for iOS, Android and Windows, sharing much of the code between different platforms.

.NET 6 (2021) continued the unification path and introduced new features, including greater integration with artificial intelligence solutions and the ability to develop applications for the Internet of Things (IoT). In November 2022 it was the turn of .NET 7 with improved runtime performance, support for .NET MAUI (Multi-platform App UI) which put the ability to do so in the hands of developers create cross-platform apps with a single code base.

.NET 7 also improved support for the architecture ARM64 to enable the creation of apps optimized for these platforms, introduced improvements on the browser and web server side, improved support for running .NET apps on Linux systems, thanks also to a partnership with Canonical to integrate .NET in Ubuntu.

What you can do with .NET 8

In mid-November 2023, Microsoft announced the availability of the final version of .NET 8a package that stands out above all for its new features cloud-orienteddue to the presence of full-stack Blazor, for advanced features for building artificial intelligence apps. The new version of .NET also strengthens the link with .NET FIXED.

Let’s summarize what you can do with .NET 8:

  • Integrate large language models (LLM) as OpenAI’s GPT directly in .NET apps.
  • Exploit Blazor so you can use a single component template to handle all your web UI needs.
  • Distribute the mobile applications on the most updated versions of iOS and Android with .NET MAUI.
  • Discover new things thanks to C# 12 language improvements which make programming code more concise and expressive.

Of particular importance for businesses, .NET 8 is one release LTS (Long Term Support) – as happens in odd years -. This means that it will be supported and updated, even with security fixes, for 3 years instead of 18 months as happens with standard releases.

As the download page confirms, Microsoft is committed to supporting .NET 8 until November 10, 2026.

The main new features of .NET 8

Years ago, survey results indicated the absence of Native AOT in .NET Core as a major obstacle on the road to development platform adoption. Microsoft engineers have therefore made a significant effort in implementing this feature.

Native AOT (Native Ahead-of-Time Compilation) is a technique of compilation which converts an application’s source code to native machine language before actual execution. This is an opposite approach to compilation JIT (Just-In-Time) compilation, which translates the source code into machine language during application execution. In the past we’ve talked about the improvements Google has made to its JIT compiler to make Chrome faster.

With Native AOT, since the code is already compiled into machine language, the applications tend to stand out startup times faster than those that use JIT compilation. The performance improvement is therefore tangible because the code is already optimized and ready for execution.

Performance improvements

Building on the Native AOT approach, .NET 8 offers thousands of software improvements performance, stability and security, Microsoft explained. Like every year, Stephen Toub (Microsoft) put the performance of .NET under the microscope: the engineer stated that if .NET 7 was very fast, .NET 8 is even faster.

.NET 8 introduces a new code generator and dynamic profile-guided optimization (PGO), a mechanism capable of optimizing code based on real-world application usage. This feature can improve performance by up to 20%.

The AVX-512 instruction set, once bitterly reviled by Linus Torvaldsallows parallel operations on 512-bit data vectors and is now actively supported and used in .NET 8. In this way, those who develop advanced applications can take advantage of even faster processing.

Furthermore, i primitive types now implement a formattable and parsable interface, allowing formatting and parsing of UTF-8 data without any overhead resulting from transcoding.

.NET 8 focuses heavily on the cloud

The emphasis on cloud it is evident from the first words of the presentation given by Microsoft staff. With this release, it explains, .NET redesigns the way we can build intelligent applications, cloud-native and high-traffic services that know climb automatically based on the request. .NET 8 simplifies the development of these applications, regardless of whether they need to reach systems Linux o Windowswhich are started within container or on any cloud platform.

Particularly relevant is the debut of .NET Aspirea stack that helps in tuning applications cloud-native resilient, observable and configurable. The technology proposed by Microsoft guides the programmer by proposing specific conventions and assumptions that help to do things in the best way. .NET Aspire consists of a set of advanced components that allow you to enrich your own app cloud with telemetry tools, supporting resilience, for granular configuration as well as a series of health checks.

Blazor as a web development platform

With the release of .NET 8, Blazor establishes itself as a web development framework full-stack, equipped with new features aimed at optimizing page load time, scalability and user experience. With support for Blazor Server e Blazor WebAssembly in the app itself, developers can take advantage of the flexibility offered by the technology.

Blazor can now handle all your web UI needs. Additionally, the introduction of a runtime based on ‘Jiterpreter‘ and new integrated components, significantly accelerate the execution of .NET code using WebAssembly. In another article we saw in detail what WASM (WebAssembly) is and why it is a revolution in the development of applications for the Web.

The opening image is from Microsoft.

LEAVE A REPLY

Please enter your comment!
Please enter your name here