Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use the full .NET Framework with ASP.NET Core?

With ASP.NET Core 1.0 release one can run on either .NET Core or the full .NET Framework per the documentation here. I'm trying to understand the latter option of why one would select ASP.NET Core + the full .NET Framework?

I understand the difference between the full .NET Framework and .NET Core. However, if I wanted to use the full .NET Framework, why not just use ASP.NET 4.6? I thought the idea was a 1-2 punch with ASP.NET Core atop of .NET Core allowing the slew of benefits like cross platform deployment, modularization, ability to deploy to a Docker container, performance, etc. Without .NET Core I don't believe anything on that list is still valid, so what is the use case for the full .NET framework + ASP.NET Core? What does ASP.NET Core on it's own still provide to me without .NET Core?

like image 859
atconway Avatar asked Oct 05 '16 03:10

atconway


People also ask

Does .NET Core need .NET framework?

Net Framework is used for the development of both desktop and web applications as well as it supports windows forms and WPF applications. . NET Core is packaged and installed independently of the underlying operating system as it is cross-platform.

Can ASP.NET Core work with the .NET framework?

In order to run ASP.NET Core Apps on the . NET Framework it needs to only reference . Core NuGet packages which contains only the . NET Standard 2.0 builds.

Why we choose NET Core over .NET framework?

NET Core is faster than . NET Framework because the architecture of . NET Core is written or restructured from scratch to make it a modular, lightweight, fast, and cross-platform Framework. The Applications require technologies like workflow, webforms or WCF that are not present in .

What is full .NET framework?

Net Framework was developed as a runtime execution environment and is the first implementation of . Net. Unlike Microsoft . Net Core, . Net Framework is used to build applications that can run only on the Microsoft Windows platform.


2 Answers

.NET Core allowing the slew of benefits like cross platform deployment, modularization, ability to deploy to a Docker container, performance, etc.. Without .NET Core I don't believe anything on that list is still valid

The only benefit you don't have if you choose the full .NET framework over .NET Core is being cross platform. All the other benefits of deployment, modularization, docker, performance, etc... are still valid.

We actually run our ASP.NET Core web app on the full framework and now we enjoy the benefits of having Dependency Injection as a 1st class citizen, having NuGet built in, having an lean HTTP request pipeline which makes our performance better, open sourced (so all the issues can be solved by a short visit to GitHub), modularity (still have to come across something we couldn't customize to our own needs after almost a year now), and so on. And we know we don't need to deploy on any other OS than Windows, so we can still have all the benefits of the full framework.

Update from Tseng

Well, you can still target full .NET Framework under Linux for example. There you need mono 4.6 installed there. There are some limitations as not all classes are implemented in mono, but a majority is and around the corner case (i.e. encryption) you have to work around

Update from atconway

It's also worth noting at the time VB.NET is not supported by .NET Core if that's a requirement.

like image 56
Danny van der Kraan Avatar answered Sep 20 '22 16:09

Danny van der Kraan


However, if I wanted to use the full .NET Framework, why not just use ASP.NET 4.6?

If I use ASP.NET 4.6 instead of ASP.NET Core 1, then I won't be able to use ASP.NET Core MVC. None of the features on that documentation page would be made available to me! I would have to build an MVC5 application. Boooo!

I'm trying to understand the latter option of why one would select ASP.NET Core + the full .NET Framework?

I'm assuming that another way to ask this would be: "why would you take the red path when you can take the brown path?"

enter image description here

One argument for doing it this way is deployment. If you've got a bunch of existing Windows servers with IIS on them, you're going to need to install additional software on each of them and set them up to run Core applications. IIS just becomes a reverse proxy for your .NET Core app.

However, if these apps were built on the .Net Framework instead, you wouldn't have to do this. You could still use web deploy (for example) to move them onto the servers. Maybe you've got some other existing IIS configuration settings that you don't want to migrate.

Using ASP.NET Core 1.0 targeting the .Net Framework, you can get the benefit of the new features in ASP.NET Core MVC without having to change your existing infrastructure.

like image 41
Will Ray Avatar answered Sep 21 '22 16:09

Will Ray