ASP.NET Or ASP.NET Core, What To Choose?

Someone just asked me a question on C# Corner – What is the difference between ASP.NET and ASP.NET Core, and what should I choose to build my next Web application?

Another question, I saw was: Should I choose ASP.NET Core over ASP.NET in my next project?

This article talks about some of the pros and cons that might help you make a decision between ASP.NET and ASP.NET Core.

.NET Architecture

Let’s review the following .NET Architecture diagram.


As you can see from the above diagram, the .NET ecosystem has three major high-level components: .NET Framework, .NET Core, and Xamarin. I personally feel the Xamarin part should fall under .NET Core which might just happen in the near future.

The .NET Framework is used to develop Windows applications using WPF and Windows Forms and Web applications, using ASP.NET MVC.

.NET Core supports UWP and ASP.NET Core libraries. UWP is used to build Windows 10 targeted apps and ASP.NET Core is used to build Web apps for Windows, Linux, and Mac operating systems.

Choosing between ASP.NET MVC and ASP.NET Core

ASP.NET Core is one of the key components of .NET Core to build Web applications, using ASP.NET.

 Jeff Fritz from Microsoft writes in his article, Should I Use ASP.NET Core or MVC 5:

“Both frameworks will still be supported in at least 4 years. Both frameworks have an MVC approach to coding and both use a very similar Razor templating language.”

The following table is a list of key takeaways from Jeff’s article:

 Feature

 ASP.NET MVC or ASP.NET Core

 Stable framework

 ASP.NET MVC

 Raw performance

 ASP.NET Core

 Tested and proven for a decade

 ASP.NET MVC

 Leading edge, continuous learning, and upgrades

 ASP.NET Core

 Target multiple operating systems

 ASP.NET Core

 Windows container model support

 Both

 Share components across various platforms – Web server, Mac, iOS, Android, XBox, Windows Mobile, Windows desktop, Unity

 .NET Standard with either.

Students vs Professional Developers

For professional developers, if you’re building a new website and you have to make a choice today, here are some scenarios.

ASP.NET Core is a better choice, if you -

  • Want to target your Web app on Windows, Linux, and Mac operating systems.
  • Are not afraid of learning new things.
  • Are not afraid of breaking and fixing things since ASP.NET Core is not fully matured yet.

 

ASP.NET MVC is a better choice if you -

  • Don’t need a cross-platform support for your Web app.
  • Need a stable environment to work in.
  • Have nearer release schedules.
  • Are already working on an existing app and extending its functionality.
  • Already have an existing team with ASP.NET expertise.

 

For students, if you’re just learning and have no plans to join a company for the next year or so, ASP.NET Core is a better choice for you. It will give you more options to choose from in the near future.

Porting ASP.NET MVC to ASP.NET Core

The following document lists the process and tools of migrating your existing ASP.NET MVC project to ASP.NET Core.

https://docs.microsoft.com/en-us/dotnet/articles/core/porting/index