Why you should consider using .NET Core for your next project
Written by Fredrik Erasmus, Senior Developer at Saratoga
What is .NET Core?
While I’ve worked in software development for several years using the .NET Framework, in 2017 I started using .NET Core 1.0 for the first time – it was love at first sight. The .Net Framework was released back in February 2002, and is still a highly popular framework for developers with substantial time and effort being invested into this framework. As a successor to the .NET framework, .Net Core is a significant departure and the benefits of using this framework for the development of websites, services and apps stretch well beyond its cross-platform capabilities
From one developer to another – lessons from my journey with .NET Core
My initial experience with .NET Core saw me using various technologies considered ‘alien’ to the .NET world. Thanks to the cross-platform functionality of .NET Core, I had the opportunity to setup an ASP.NET Webapi on Ubuntu running behind Nginx. Even from this first experience working with .NET Core, I greatly enjoyed the minimalistic approach of this framework and found myself leaning towards preferring to build apps for .NET Core more than for .NET Framework. In particular, I really enjoyed using the tooling within .NET Core as I was no longer tied to only using Visual Studio – now I had the choices from Visual Studio code to JetBrains Rider.
Speaking of choices – for years the default web server for ASP.NET was IIS. Using IIS invariably meant using Windows Server. Windows Server is a great piece of software but have you ever connected to a Windows Server instance on a low quality internet connection? Remoting into a Windows Server box is very slow compared to running an SSH connection to a Linux box. Running an ASP.NET application on Linux opened up a new world. I could connect to a Linux machine over SSH. The experience of working in the terminal has been very rewarding for me personally.
Windows Server has an associated licensing cost – Linux on the other hand is quite a bit cheaper. Linux, being open source, does not have the licencing cost associated to it. To say Linux has no cost would be untrue. Linux brings complexity – developers require a different set of skills. Linux is dominated by the terminal – a command line utility with no user interface. Not all developers enjoy using the command line. Many developers prefer using a graphical user interface, so the switch to a Linux terminal might not suit their style of development. .NET Core runs perfectly well on Windows Server – you can still use IIS. Personally though I would select a Linux instance every time.
The Microsoft tools for developing .NET Core applications are not really different from developing applications for .NET Framework applications. In fact you get to use the same Visual Studio you would use for writing .NET Framework applications. I have found Visual Studio 2017 onwards to provide the best experience for developing .NET Core applications. The familiarity of Visual Studio is a big plus. Imagine writing your code – including tests using Visual Studio and having it deployed to Linux.
Reasons to consider using .NET Core for your next project
- .NET Core is cross-platform – you can run ASP.NET websites on Linux.
- Running ASP.NET websites on Linux has benefits over running on traditional IIS hosts.
- Running an ASP.NET website behind a proxy such as Nginx means leveraging its performance for serving static content.
- Linux hosting is cheaper when compared to Windows hosting due to its licensing.
- The benefit to the developer experience remains consistent because you are writing code for .NET Core applications using well-known tools such as Visual Studio.