Monday, March 5, 2018

Why you should start using .Net Core

I started working with .Net back in 2005 when it was still on v1 or early beta. Coming from classic ASP and Perl, that was a real change - for the better!

But with lots of limitations. I remember working on a very complex project on a Insurance company using .Net 1.1. Back then, as an example, the framework didn't have Nullable types yet so we had to implement our own INullable<T> class. Not so fun, right?

It makes sense to use frameworks IF they accelerate and simplify the software development process, not the other way around. Developers like to always be using the latest tools and features but that's a big risk!

Sometimes, frameworks are just not ready making them usually not production-ready.

The .Net Framework

Everything changed for .Net developers when .Net 2.0 was released. Nullable types (yay!) and many other cool features like iterators and anonymous methods were released, making it a serious framework for complex systems.

As the .Net framework grew in popularity, Microsoft constantly kept improving it after each release. For example, my favourite features were:

(For more info on the .Net Framework's history, please click here.)

.Net Core

Then Microsoft decided to release .Net Core and the .Net Standard. But why?

For those who never heard about .Net, .Net Core it is a cross-platform development framework that can be used in servers, workstations, mobile devices, cloud and embedded/IoT devices.

For those who know the .Net framework, .Net Core it's an attempt to build a much better .Net.

So far my favourite features of .Net Core are:
  • Cross-platform: Runs on Windows, Mac and Linux;
  • The availability of powerful command-line tools: different from previous .Net versions, Net Core can be exercised using command line tools like we're used to doing in Linux for so long. Finally!
  • Compatible with other frameworks via the .NET Standard;
  • Open source: we can read, fix and contribute to the code;
  • Can be included in your app or installed side-by-side user- or machine-wide.

.Net Core 2.0

The real game changer is .Net Core 2.0 though. Look at some of the improvements that came with it:
  • Massive API increase (>100%) relative to .NET Core 1.x.
  • Support for .NET Standard 2.0.
  • Support for referencing .NET Framework libraries and NuGet packages.
  • use the Linux .NET Core SDK and Runtime builds for most Linux distros.
  • The total number of APIs added to .NET Standard is ~20,000;
  • More than doubled the set of available APIs from 13k in .NET Standard 1.6 to 32k in .NET Standard 2.0
.Net Standard 2.0 - Source

And why is it so important? Because as it happened with the .Net framework, .Net Core wasn't ready at all until 2.0. Click here to view the original announcement, released on May 2017.

Next Steps

Excited? Well, you should be. .Net Core is Microsoft's bold attempt to modernize their omnipresent framework.

I will follow up with more in depth articles on .Net Core and share my thoughts on some experiments that I plan to run on my Windows and Linux boxes.

Keep tuned!

See Also

Package Management in .Net CoreExporting Html to Pdf using only JavaScript
Importing CSVs with .Net Core and C#
Exporting a CSV generated in-memory in Asp.Net with C#
Building and Running Asp.Net Core apps on Linux
Asp.Net / Asp.Net Core: Generating views in the backend

For more posts on .Net Core, please click here.

References

.Net Framework History
.NET Core Guide
Announcing .NET Core 2.0 Preview 1
Announcing .NET Core 2.0
.Net Core 2.0 Release Notes
.Net Blog
Announcing .NET Standard 2.0