.NET 5 Is the Future of .NET: What Every .Net Developer Must Know
We take a peak into Microsoft's latest announcements around its popular open source web development frameworks.
Join the DZone community and get the full member experience.Join For Free
Microsoft announced the new .NET 5 (future of .NET) at the Build 2019 conference. .NET 5 will be the single unified platform for building applications that runs on all platforms(Windows, Linux) and devices (IoT, Mobile).
If you are .NET developer currently supporting enterprise applications developed in .NET framework, you need to know how the .NET 5 is going to affect your current enterprise application in the long run. .Net 5 is based on .Net Standard which means not every .Net framework features will be available in .Net 5. Also, there are some technology stacks like web forms, WCF and WWF is not porting into .Net 5. We will look into the details of what is not covered in .Net 5 and what are the alternatives.
Technology Stacks Not Coming to .NET 5
ASP.NET Web Forms
If you are currently using ASP.NET MVC as a full stack web app, you can continue to use the same stack by using ASP.NET Core MVC or the new Razor Pages introduced in .NET Core 2.0, which may look similar to ASP.NET web forms for quickly building web form applications without views and controllers. However, if you are developing modern web applications for enterprises, its better to consider single page applications such as Blazor, Angular, or React instead of a traditional web app for providing rich client-side functionality.
WCF (Windows Communication Foundation)
The announcement that WCF is going to miss the .NET 5 train surprised many, including me. There has been a lot of discussion on GitHub of bringing back WCF into .NET Core, but Microsoft decided not to do so because their initial estimation for porting WCF into .NET Core was three years. (Source: DotNetRocks Podcast)
Microsoft is recommending the use of gRPC as an alternative which is a modern, open-source, high-performance RPC framework that can run in any environment. However, unlike WCF, gRPC cannot be hosted in IIS as of today, because of HTTP/2 implementation of Http.Sys does not support HTTP response trailing headers which gRPC relies on.
WWF (Windows Workflow Foundation)
The Workflow Foundation is not getting ported into .NET Core. Every enterprise application will have some workflow or BPM tools integrated with it. If you used WWF in your application, Microsoft is recommending you look at the unofficial fork of WF runtime for porting into .NET Core.
Technology Stacks That Are Coming to .NET 5
Winforms, WPF, and UWP
Microsoft is bringing Windows Desktop Packs (winforms, WPF, and UWP) to support desktop applications which only works on Windows. I wouldn’t expect anyone to use winforms for any new development, however, this will help to port legacy winforms applications into .NET 5. This doesn’t mean that .NET Core's architecture is changing. It will still be a cross-platform framework but when you are adding desktop packs, it is targeted to only work on windows. However, porting existing Windows desktop applications into .NET Core will give the additional benefit of Core Runtime and API performance improvements and deployment flexibility.
What’s Been Replaced
- EF Core - Entity Framework Core is replacing EF 6 in the .NET Core Framework.
- ASP.NET Core - ASP.NET is replaced by ASP.NET Core. Check the migration guide for porting ASP.NET applications into ASP.NET Core.
- ASP.NET Core MVC - ASP.NET Core MVC unified ASP.NET MVC and Web API. Check the migration guide for porting asp.net mvc app into ASP.NET MVC.
- MSIX - Microsoft's new packaging tool which replaces the old MSI package installer for desktop applications.
- JsonDocument - The new Json Document library from the System.Text.Json.JsonDocument API will replace json.net. It is 2-3 times faster than the old json.net.
A Few Other Important Things to Highlight
The latest version of C# 8.0 introduced a lot of new language features including Async Stream, Ranges, Nullable Reference Types, and Pattern Matching. However, they are going to be available only on .NET Core 3.0 and above, which means it is not coming to the legacy .NET Framework, or .NET Core 2.2 , 2.1, or 1.0. It clearly indicates that .NET is dead and .NET Core is the future.
If you are planning to port .NET applications into .NET Core, you will have to analyze your APIs used in your project to see what is compatible or not. .NET Portability Analyzer is a tool that helps to analyze and determine how flexible your application is across .NET platforms.
Published at DZone with permission of Jeeva Subburaj. See the original article here.
Opinions expressed by DZone contributors are their own.