Why .NET Core is awesome!

You could be here, reading this, for a number of reasons.

  • You don’t know what .NET Core is and are intrigued
  • You are a driven and curious developer and want to know the new and shiny is.
  • You kinda know .NET Core and want to dig deeper.
  • You believe to know .NET Core and wonder what might be so awesome.
  • You stumbled upon this post and have no clue what this all is about.

Whatever brought you here, I got you covered.

What is .NET Core anyway?

At its most fundamental level .NET Core is the free open source sister platform to the .NET Framework. That is what most people mean, when they simply say “.NET”. Both .NET Core and .NET Framework are using C# as their programming language.

.NET Core is Microsoft’s attempt to make the Windows-only .NET platform open to other environments. To achieve that they started from scratch and began re-implementing the .NET Framework library APIs in a platform-independent way. Microsoft announced .NET Core in 2015 and released a 1.0 version in 2016 with about 10% of the .NET Framework public API. That is not enough to be a replacement, but enough to show its potential. Amongst the first components were a Core version of Entity Framework (basically the de-facto standard .NET ORM) and ASP.NET (the web application framework Microsoft provides for .NET) and ASP.NET MVC (the Model-View-Control framework built on top of ASP.NET).

The biggest feature by far in .NET Core is it’s (limited) platform independence.

.NET Framework runs and compiles on:

  • Windows and Windows only.

.NET Core (2.0) runs and compiles on:

  • Windows 7SP1+
  • Windows 10 Client
  • Windows Server 2008 R2 SP1+

(all x64 and x86)

As well as:

  • Mac OS X 10.12+
  • Red Hat Enterprise Linux 7
  • Fedora 26/27
  • Debian 8.7+/9 (popular as a Docker guest system)
  • Ubuntu 14.04, 16.04 & 17.10
  • openSUSE 42.2+
  • Linux Mint 17/18
  • SUSE Enterprise Linux 12

(all x64)

Pretty impressive in my opinion!

Starting with ASP.NET supports the claim to make .NET cloud-ready by bringing Microsoft web server technology to servers where Microsoft was practically non-existent; by reaching out to Unix and Mac machines.

This makes .NET Core the .NET for people who don’t want to be restricted to Microsoft platforms!

Microsoft does not say how the percentage of public .NET Framework APIs being compatible to/implemented in .NET Core (through .NET Standard) 2.0 is, but they claim to have roughly doubled the API size from 16k APIs to 32k between .NET Standard 1.6 to 2.0 (see below) and that .NET Standard 2.0 is compatible to 70% of the .NET Framework NuGet packages out there.

The feature set actually is big enough by now, that I will now go out on a limb and say: There is no reason at all, to use .NET Framework on a greenfield web or command-line application today. If you have no legacy dependencies, hyper-specific library needs, legacy OS support or other foreign restrictions, .NET Core got you covered! And if you don’t do web, but desktop apps that should not discourage you from using .NET Standard. You can still put all your business logic into .NET Standard library projects and reference them in your WPF or Windows Forms apps. Or you target the Universal Windows Platform (UWP), that runs on .NET Core as well. That still enables you to target that business logic to any .NET Standard compatible frontend.

Wait, what’s .NET Standard?

In 2016 Microsoft announced it as “.NET Platform Standard”. .NET Standard is inherently what makes .NET Core multi-platform.

I will cover the details in a couple of weeks, but for now it’s enough to say, that .NET Standard is the foundation that all new .NET components are based on, a common ground.

For every supported OS there is an implementation of the system libraries .NET Standard needs to run and everything building on top just works. Also .NET Standard is an application target for class libraries. You could write one .NET Standard library and use it on Core, Xamarin, UWP or Mono without changing a single line. On GitHub Microsoft claims, that .NET Framework 4.6.1 also supports .NET Standard  2, but I experienced the support before 4.7.1 as… clunky at best. But .NET Core 2 supports .NET Standard 2 in full and thus can do all, that standard can do!

I now know what .NET Core/Standard is, but why is it awesome?

You don’t. I was only able to scratch the surface of what .NET Core is and what it means. You will have to follow me and read on, if you really want to get to know .NET Core.

Besides that, C# is a great language, as you will see in the upcoming posts. It is Java – improved and supercharged. So being able to use C# on any platform is a big plus sign on my list. Also .NET is not only a mighty, yet elegant framework/platform, but it also one of the biggest players in the web market, especially on enterprise level.

Being able to run your web server on virtually any platform you could possibly find in a modern server cluster natively is pure joy. That rings especially true, if you have a product that runs in the client’s infrastructure. With .NET Core/Standard you don’t have to dictate what the client has to put into the rig. No matter if they run Win Server, SLES, Debian in Docker or a Windows 10 Workstation. No matter if the serve the site via IIS, nginx or Apache (I would not even be surprised if someone whipped up a working node.js reverse proxy). You just have them install some packages, build for the target platform and deliver them their binaries.

I actually use a build-script that is so agnostic, that I just enter the URL I want to release on, fetch some config file from disk and find some perfectly stable and complete binaries for any desired supported platform in my publishing-folder for the same code. Just recompile and be happy!

Fun fact on the side: .NET Standard even manages choosing the right directory separator in most contexts. When I started out I always used placeholder variables containing the runtime directory separator in my Java apps. In ASP.NET Core I am again and again surprised how seldom that actually is needed.

So you want to know why it is awesome?

Because it is a great platform in a great language on virtually any OS you desire (and you should only desire great things)!

2 thoughts on “Why .NET Core is awesome!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website is using Google Analytics. Please click here if you want to opt-out. Click here to opt-out.