As the long-awaited .NET 5 debuts this fall, developers across the globe are raising their heads and eyebrows to check out what has been brewing in Microsoft’s pot the past few months.
As we all know, the highly-anticipated platform is the next big release in the .Net family, following the also highly-acclaimed .NET Core 3.0.
Going forward, there will be no more “Framework” or “Core” and the fifth large iteration of the platform will commence the transition from the Windows-only, aging, and proprietary framework to a cross-platform and open-source system.
The development world is eagerly awaiting the new platform because the hype has been huge around it for months. A lot of info has leaked since Microsoft initially disclosed some of the features of the new platform. As such, it was only natural for us to gather everything we can and create a comprehensive list of what the new and improved .NET platform has in store for us.
For now, it’s safe to say that a lot of great and handy features will debut together with the latest addition to the well-known .NET family, however, a few developers have already raised a few concerns regarding the older web apps that are using the older versions of .NET frameworks.
Then again, these issues can be fixed, and only with the introduction of .NET 5 can we see the full extent of the changes and shifts in trends it will evoke, and more specifically, provoke.
A new era for Microsoft
The new .NET project marks the start of an important era and a new direction both for Microsoft and developers. Microsoft spokespeople and professionals have stated that the new platform will allow for simple and fast development, but at the same time, will have more expansive capabilities overall and utility out of the box. According to them, all of the latest features and development capabilities will be essential parts of the new platform, along with the latest C# versions.
Their main goal was to create a system that allows developers to use the same languages and .NET APIs to create a wide range of different applications through different chip architectures on various operating systems. They’ve also stated that the platform will be highly flexible, enabling professionals to make easy and swift changes to build configurations to modify the way they build their apps in Visual Studio, Azure DevOps, Visual Studio Code, Visual Studio for Mac, or directly at the command line.
So, there will be just only one .NET platform going forward, and everyone will be able to utilize its features targeting macOS, iOS, Android, Linux, Windows, tvOS, WebAssembly, watchOS, and many more. There will be also new language features, runtime capabilities, new APIs along the way too.
Ever since the initial inception of the .Net Core project, the development team at Microsoft has added a little over fifty thousand APIs to the .NET Framework, and .Net Core’s 3rd version closes the majority of the capability gaps that remained for the .NET Framework, to resolve any lingering compatibility issues with WPF, Windows Forms, or the Entity Framework.
The latest .NET 5 system aims to follow this trend and to build on this approach by taking the best of what .NET Core and Mono have to offer on a single platform allowing developers to use all of the modern .NET code they might need during a development process.
Will there be a new .NET core?
As professionals have already stated it, the new system is basically a step forward from .NET Core, improving the entire .NET ecosystem in a few crucial ways:
- Firstly, launching a single .NET framework and runtime that can be utilized everywhere with the same developer experiences and runtime behaviors.
- Improving .NET itself by taking the best features and capabilities of .NET Core, Xamarin, the .NET Framework, and Mono.
- Creating a product that sports a single-code base that developers can expand and improve together – open-source.
These are the main purposes of the new system that Microsoft developers believe will be a game-changer for the entire ecosystem. .NET 5 will allow project files and code to feel and operate pretty much the same no matter what kind of application developers are building. With access to the same runtime, language, and API capabilities to each app, and daily CoreFX-committed significant improvements will make .NET 5 a pretty handy app-building tool.
Apart from all that, everything developers came to love about .NET Core will still be available:
- The open-source nature oriented toward the community.
- Being able to implement cross-platform.
- High performance.
- The support for leveraging capabilities that are specific to particular platforms, like WPF or Windows Forms on Windows, or the native bindings from Xamarin.
- SDK-style small project files.
- Side-by-side installation capability.
- Capable CLI (Command-line interface).
- Integration with Visual Studio, Visual Studio Code, and Visual Studio for Mac.
These are the features that will carry over from the “good old” .NET Core. On the other hand, here are some of the features that are more or less stand-alone for .NET 5:
- Extended runtime experience choices/
- Available Java interoperability on every platform.
- Interoperability support on multiple operating systems for Swift and Objective-C.
- Extended CoreFX support for .NET static compilation (ahead-of-time) along with support for more operating systems and support for smaller footprints.
After launching.NET5, Microsoft wishes to deliver an improved major version each year.
As already pointed out, .NET 5 will be THE .NET platform moving forward. Microsoft wanted to introduce some clarification and simplification with this move, so people won’t be confused in the future with terms like “Core” or “Framework”.
The new, short name is the first move toward this simplification and it also clearly communicates that the new platform is uniform in terms of behaviors and capabilities.
The future of .NET
As you may already know, Mono is the original cross-platform .NET implementation which started out as an open-source .NET Framework alternative targeting mobile devices with the rising popularity of iOS and Android devices. Also, as a part of Xamarin, Mono is used as a runtime.
On the other hand, CoreCLR is the runtime that is used as a part of .NET Core, with primarily supporting cloud applications. Nowadays, it’s also used for Windows desktop, along with IoT applications for machine learning.
When taking a closer look, both of these runtimes have a lot in common, however, they also have quite a few features that are unique to them. With the introduction of .NET 5, developers will be able to choose the runtime experience they prefer. Both CoreCLR and Mono will be interchangeable drop-in replacements.
Improved throughput and productivity
In the beginning, the .NET platform used JIT to translate Intermediate Language (IL) code to optimized code for machines. Since then, Microsoft has managed to build a JIT-based runtime that handles high throughput well and enables developers to work fast and easy.
As we all know, JITs are great for client and long-running cloud scenarios. They can generate targeted, specific machine configuration code, like particular CPU instructions. They can also re-generate methods at runtime to compile code sets quickly while still enabling developers to produce highly-tuned versions of said code.
JIT also shines when it comes to development tools. They often need compiling and loading the code multiple times in a single process and JIT allows this in a fast way without restarting.
As a result, .NET 5 workloads will primarily be using the CoreCLR (JIT-based) runtime with the two exceptions being iOS and client-side Blazor. Both these need AOT native compilation.
Low memory usage, fast startup, and low footprint
Developers from the Mono project spent much time and effort focusing on gaming consoles and mobile devices. That resulted in an AOT compiler for .NET that’s based on industry-leading tech. The Mono AOT compiler gives developers the possibility to build the .NET code into a single native code that can run on machines pretty much like C++ code.
AOT-compiled applications run great in small places trading throughput for a startup if necessary.
The Blazor project is already utilizing this AOT and it will also be included in .NET 5.
As Mono AOT supports both AOT solution types (either 100% AOT compilation or partial with an available interpreter or JIT for not compatible code patterns) it’s only natural to get included in .NET 5.
Moving forward with experiences
The developers at Microsoft have stated that they see it as a priority to grow the platform overall and move it toward the latest trends in terms of reliability, diagnostics, memory use, and throughput. As such, they are focusing on achieving this primarily by improving their tools and software, like the CoreCLR and the Mono AOT compiler, by tweaking their features even further. As a result, developers will have a more streamlined experience and a more efficient development process.
On the other hand, Microsoft professionals have also stated that there are some features where there’s no need for intense tweaking.
For instance, diagnostic characteristics should be the same all across .NET 5 both regarding performance and functional diagnostics. The same applies to the support of the same operating systems and chips except for iOS and WebAssembly that require different approaches.
These were the main ideas and driving forces behind the development of .NET 5, with an emphasized focus on optimization particularly for those scenarios where workloads have needs that overlap.
Also, all of the applications for .NET 5 will run with the CoreFX framework and Microsoft will ensure that CoreFX will be a proper fit for every place where it’s not currently used. These places are primarily client-side Blazor and Xamarin workloads. .NET 5 applications will all be buildable with .NET CLI to ensure that developers have the same command-line tools with every project.
Lastly, developers who will use .NET 5 to build and write apps will also be able to use the latest C# features and versions.
The project of developing the new platform kicked off in December 2018, with all respective .NET teams from Xamarin/Mono, NET Core, and Unity bringing a set of visions, technical capabilities, and directions regarding architecture and other crucial features.
With such a gargantuan project of moving from an entire .NET ecosystem to a single implementation raises quite a few important questions. Will code writing for specific architectures will be different or the same? How will it work? Will all workloads be supported by default by .NET 5 SDK? If not, which will be? Will there be a need for .NET Standard? These are only some of the questions and issues the developer teams were sorting during the development cycle.
Will .NET5 affect your work?
Some professionals have already pointed out that the release of the new platform will most certainly affect the work of those .NET developers who currently work with enterprise apps that were developed in the older .NET frameworks. Since .NET 5 is heavily based on .NET Standard, potentially, nor every .NET framework feature will be supported on .NET 5. Apart from that, there are also a few technology stacks that won’t port into .NET 5.
In this section, we will look at the stacks that won’t come to the new platform and those which are. Also, we will try to give you a few pointers to tackle any obstacles you might face in the future regarding the launch and the long-term effects of .NET 5 on your current web app.
Tech stacks that are not coming to .NET 5
On the other hand, if you are using ASP.NET MVC as your full-stack web application, you can continue to run the same stack only you need to use ASP.NET Core MVC or the latest Razor Pages which look a lot similar to ASP.NET web forms, allowing you for quick web form app building without views and controllers. On the other hand, if you are tasked with developing modern web apps for large enterprises, you might want to consider building single-page apps like Angular, Blazor or React. These provide rich client-side functionality in comparison to traditional web apps.
Windows Communication Foundation or WCF: Many developers were baffled when they’ve heard that Windows Communication Foundation will be missing from the latest addition to the .NET family. There was even a fueled discussion on GitHub debating whether Microsoft should bring back WCF into .NET but the company decided against the move in the end.
As an alternative, the company recommends using gRPC as a possible alternative. It’s a modern, high-performance, and open-source RPF framework that runs smoothly in any given environment. The only problem is, gRPC can’t be hosted in IIS yet, because of the HTTP/2 implementation of the Http.Sys does not support the HTTP response trailing headers that gRPC heavily relies on.
Windows Workflow Foundation or WWF
Just like the ones listed above, the Workflow Foundation too will be missing from .NET 5. As an alternative, Microsoft recommends looking at the unofficial WF runtime fork and porting that into your current application.
Stacks that are coming to .NET 5
Uwp, WPF, and Winforms: Windows Desktop Packs are coming back and will support desktop apps that are only compatible with Windows. This might not be a game-changer for new development projects, however, it will help with porting legacy inform applications into .NET 5 a great deal. This doesn’t mean any changes, the new .NET platform will still be cross-platform but the desktop packs are targeted to work only on Microsoft’s dedicated operating system. On the other hand, if you port existing desktop apps into .NET 5 you can leverage the additional benefits of API and Core Runtime performance improvements, along with deployment flexibility.
Things getting replaced
• EF Core – The Entity Framework Core will replace EF 6
• ASP.NET Core – ASP.NET will replace Asp.NET.
• ASP.NET Core MVC – Unified ASP.NET MVC and WEB API
• MSIX – This will replace the old MSI package installer for managing desktop applications.
• Json Document – this new library will replace the json.net improving speed since it’s 2 or 3 faster than the older version.
Other things you should know
The latest versions of C# and other updates and features like Ranges, Nullable Reference Types, Pattern Matching, and Async Stream won’t be available to older .NET framework versions. This is a clear sign that Microsoft is trying to move forward from past frameworks and focuses primarily on “The Core” or .NET 5.
Also, porting older .Net applications into the latest addition will require you to analyze the APIs you used in the project to see what will remain compatible and what will not. For that, you can use the .NET Portability Analyzer to assess just how flexible your web app is in its current state when it comes to using the across all .NET systems.
.NET 5 short key features
- Easy migration to Blazor and other platforms like Angular, Vue, or React.
- Improved Security – Encryptions, code checks, validations, and code access security will make the new .NET platform safe. Also, the MVC architecture will allow for safe and fast scalability. As you may know, older ASP.NET frameworks had a few quite serious problems regarding security (mostly because they lacked the features mentioned above), and .NET 5 will usher in a new era in terms of security as well.
- Blazor – A framework from the .NET family that uses C#, HTML, and Razor to create web apps. Coupled with .NET 5, Blazor will handle routing, server-side rendering, routing, dealing with dependency injections, forms, and validation, just to mention a few key features.
- Cloud usage – As cloud services have managed the gain popularity in recent years (mostly due to their huge storage space availability and the accessibility it sports) Microsoft launched Azure, its dedicated cloud storage that .NET apps can use for data storage and web sites that use the ASP.NET MVC front-end.
- ML.NET 1.4 – A Microsoft update that will enable .NET apps to execute certain machine learning features, with the aim of improving user-experience even further.
ML.NET is a machine learning, open-source, and cross-platform framework that consists of CLI and Model Builder for creating AutoMl-based machine learning models (AutoML standing for Automated Machine Learning). This comprehensive feature can enable developers to showcase custom models like customer segmentation, sales forecast predictions, price prediction, and many more.
These features can clearly serve as an advantage when it comes to improving user experience and the new .NET platform seems to offer quite a lot in that aspect.
Microsoft’s Goals With .NET 5
We’ve already discussed that Microsoft has pretty huge plans with its upcoming platform and the company clearly wants to raise the bar in the world of web development.
So, with that in mind, what are the takeaways and main changes developers should expect?
- Unified SDK features with .NET – The newest addition to the .NET family will sport a single Base Class Library for all net applications with integrated support for Xamarin, meaning that mobile support will pretty much be a standard feature.
- Cloud-Native Apps – Single file, high-performance microservices, and high support for building projects both locally and on the cloud.
- Web apps and native applications will support and work on all platforms – Apps will run flawlessly across the board on several devices like iOS, Windows Desktop, or Android. Developers just need to use the native supported controls on the specific platforms.
For web apps, a single Blazor project can support an app and make it work in mobile, in your browser, or as a native desktop app.
The new platform is not only an exciting and highly anticipated moment for Microsoft but for developers all around the world who have been using .NET.
The development teams wish to make the platform simpler but to make it have more utility and capabilities than any other previous .NET system.
Without any doubt, taking on such a huge project is no easy task and there are a lot of pitfalls on the way. .NET 5 isn’t only a new and improved version of their previous frameworks, but a stand-alone system that takes every loved feature of the entire .NET ecosystem and implements it into one comprehensive platform. As such, it will enable developers to streamline their processes and to get the job done faster when building .NET applications across the board, across multiple devices, chips, and operating systems.
Will they succeed? Will there be a need for heavy modification from the open-source community? So far, only time will tell. Nonetheless, .NET 5 sounds more than promising and a great way for Microsoft to kick off a new era in the world of .NET.
That being said, it’s enough for developers to know C# to develop great applications that can run almost anywhere from IoT to the Cloud. On the other hand, the launch of .NET 5 and the changes it will bring will potentially affect quite a few enterprise WCF and Web Forms-based web apps and their owners.
Resolving the emerging issues probably won’t be too demanding but will most certainly cause a few headaches to developers across the globe. Nonetheless, .NET 5 will usher in a new era with tons of exciting new features and possibilities.
More on development:
- Benefits of Integrating React into your Website
- Advantages and Disadvantages of The Laravel Framework
- GatsbyJS Fundamentals for Beginners
- Graphic Standards Manual: Your Ultimate Business Brand Tool - 5. August 2020.
- 10 Best Web Development Magazines For Inspiration In 2020 - 30. July 2020.
- Chatbots & eCommerce – Everything You Need to Know - 28. July 2020.