ASP.NET Core Is in Trouble. Or Is it?
ASP.NET Core Is in Trouble. Or Is it?
Is Microsoft's removal of support of the full .NET Framework for ASP.NET Core 2 an actual cause for concern? Or is this whole thing blown out of proportion?
Join the DZone community and get the full member experience.Join For Free
Bugsnag monitors application stability, so you can make data-driven decisions on whether you should be building new features, or fixing bugs. Learn more.
Currently ASP.NET Core - Microsoft's new web framework - can be used on top of .NET Core and on top of the .NET Framework. This fact is pretty nice, because you are able to use all the new features of ASP.NET Core with the power of the huge but well known .NET Framework. On the other hand, the new cross-platform .NET Core is even nicer, but with a smaller set of features. Today you have the choice between of being x-plat or to use the full .NET Framework. This isn't really bad.
Actually it could be better. Let's see why:
What Is the Issue?
Microsoft removed the support of the full .NET Framework for ASP.NET Core 2.0 and some developers are not really happy about that. See this Github Issue thread. ASP.NET Core 2.0 will just run on .NET Core 2.0. This fact resulted in a hot discussion within that GitHub issue.
While the discussion was running, David Fowler said on Twitter that it's the best to think of ASP.NET Core 2.0 and .NET Core 2.0 as the same product.
Does this makes sense?
I followed the discussion and thought a lot about it. And yes, it starts to make sense to me.
What many people don't recognize, or just forget about, is the .NET Standard. The .NET Standard is an API definition that tries to unify the APIs of .NET Core, .NET Framework, and Xamarin. But it actually does a little more, it provides the API as a set of Assemblies, which forwards the types to the right Framework.
Does this make sense to you? (Read more about the .NET Standard in this documentation).
Currently ASP.NET Core runs on top of .NET Core and .NET Framework, but actually uses a framework that is based on .NET Standard 1.4 and higher. All the referenced libraries, which are used in ASP.NET Core are based on .NET Standard 1.4 or higher. Let's call them ".NET Standard libraries." These libraries contain all the needed features, but doen't reference a specific platform other than the .NET Standard API.
You are also able to create those kinds of libraries with Visual Studio 2017.
By creating such libraries you provide your functionality to multiple platforms like Xamarin, .NET Framework, and .NET Core (depending on the .NET Standard Version you choose). Isn't that good?
And in .NET Framework apps you are able to reference .NET Standard based libraries.
.NET Core is just a runtime to run Apps on Linux, Mac, and Windows. Let's see the full .NET Framework as a runtime to run WPF apps, Winforms apps, and classic ASP.NET apps on Windows. Let's also see Xamarin as a runtime to run apps on iOS and Android.
Let's also assume, that the .NET Standard 2.0 will provide the almost full API of the .NET Framework to your application, if it is finished.
Do we really need the full .NET Framework for ASP.NET Core, in this case? No, we don't really need it.
What If ...
- .NET Framework, .NET Core, and Xamarin are just runtimes?
- .NET Standard 2.0 is as complete as the .NET Framework?
- .NET Standard 2.0 libraries will have the same features as the .NET Framework?
- ASP.NET 2.0 Core uses the .NET Standard 2.0 libraries?
Do we really need the full .NET Framework as a runtime for ASP.NET Core?
I think not!
Does it also makes sense to use the full .NET Framework as a runtime for Xamarin Apps?
I also think not!
ASP.NET Core and .NET Core shouldn't really be shipped as one product, as David suggested. As it is on top of .NET Core, perhaps another technology could also be on top of .NET Core in the future. But maybe it makes sense to ship it as one product, to tell the people that ASP.NET Core 2.0 is based on top of .NET Core 2.0 and needs the .NET Core runtime (the classic ASP.NET is also shipped with the full .NET Framework).
- .NET Core, Xamarin, and the full .NET Framework are just a runtimes.
- The .NET Standard 2.0 will almost have the same API as the .NET Framework.
- The .NET Standard 2.0 libraries will have the same set of features as the .NET Framework.
- ASP.NET Core 2.0 uses NET Standard 2.0 libraries as a framework.
Given these facts, Microsoft's decision to run ASP.NET Core 2.0 on .NET Core 2.0 only doesn't sound that evil anymore.
From my perspective, ASP.NET is not in trouble and it's all fine and it makes absolute sense. The troubles are only in the discussion about that on GitHub and on Twitter.
What do you think? Do you agree?
Yesterday in an official blog post of announcing ASP.NET Core 2.0 preview1, (Announcing ASP.NET 2.0.0-Preview1 and Updates for .NET Web Developers) Jeff Fritz wrote, that the preview 1 is limited to .NET Core 2.0 only. The overall goal is to put ASP.NET Core 2.0 on top of .NET Standard 2.0. This means it will be possible to run ASP.NET Core 2.0 apps on .NET Core, Mono and the full .NET Framework.
Published at DZone with permission of Juergen Gutsch , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.