ASP.NET Core

ASP.NET Core is an application development platform developed and maintained by Microsoft and the .NET community. It is cross-platform and support different operating systems.

ASP.NET VS ASP.NET Core

What is ASP.NET Core?
Generally Microsoft .NET Framework has only worked on Windows devices. The Xamarin and Mono projects worked to bring .NET to mobile devices, and Linux, macOS. In 2016 Microsoft developed their next version of ASP.NET Framework. The framework was going to be called ASP.NET 5. But at last time Microsoft changed the name to ASP.NET Core. ASP.NET Core provides a standard library that now can be used in Windows, Linux, macOS, and mobile devices.

Currently it does not support to create desktop applications. Developers can write codes in C#, F#, Visual Basic. Several text editors and IDEs such as Visual Studio, Visual Studio Code, Sublime Text and Vim can be used. Coding environment can be Windows, Linux, and Mac. Basic characteristics of .NET Core is given bellow:

  • Open source – it is open source and using MIT and Apache 2 licenses.
  • Cross platform- it runs on Windows, Mac, and Linux operating systems.
  • Flexible deployment – it can be host Microsoft IIS or others web servers and hosting environment.
  • Compatible – it is compatible with .NET Framework, Xamarin and Mono
  • Supported by Microsoft – it is supported by Microsoft.

When should use .NET Core
In order to choose .NET Core we need to consider the following points:

  • If we need to run the applications across multiple platforms such as Windows, Linux and Mac.
  • If Microservices are being used.
  • If we need to run multiple .NET versions side-by-side. Multiple services with different versions of .NET Frameworks can be run on the same server.
  • If we want command line interface (CLI) control. Some developers prefer to work in lightweight editors and command line control. ASP.NET Core has a CLI for all supported platforms. It requires marginal installation on production machines. And there still is the opportunity to switch to an IDE such as Visual Studio.

When not to use .NET Core
In order to choose .NET Core we need to consider the following points:

  • It doesn’t support all features and libraries of .NET Framework.
  • It doesn’t support Windows Forms and WPF applications
  • It doesn’t support WCF service currently. We need to make a REST API with ASP.NET Core MVC.
  • It may not support some third party DLL or libraries. .NET Core 2.0 is stand but it may have some issues.
  • It doesn’t support SignalR. It is planned for .NET Core 2.1 and is coming soon.
  • It support VB.NET and F# partially. Microsoft is still working on it.

ASP.NET vs ASP.NET Core – Side by Side Comparison
ASP.NET Core is really fast and completely open source, choose only the libraries required for your app and take complete control of the HTTP request pipeline with Middleware’s.

Let’s quickly compare the relative disk footprint and performance metrics of the two Frameworks. Let’s create two projects (one is .NET and another one is .NET Core) in Visual Studio 2017. With no modifications at all, just inspect the relative size on disk for each project as well as the size on disk for the published site. You will get dramatic difference. ASP.NET Core projects size is smaller than traditional ASP.NET project. Because Core eliminates unnecessary NuGet Packages.

Host the two project in the IIS. Let’s inspect the memory uses, ASP.NET Core project runs with over 10x less memory usage! If you perform a load testing you will get ASP.NET Core project is using less memory, CPU time.

Comments

  1. By Bulbul Ahmed

    Reply

    • By Rashed

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *