
What Makes .NET Core So Special? - jamesmh
https://www.blog.jamesmichaelhickey.com/What-Makes-NET-Core-So-Special-Why-You-Should-Use-NET-Core/
======
smashedtoatoms
I’m in the process of porting a bunch of go code to dotnet core 2.1 on AWS
lambda. I’m on a Mac using vscode. I never installed mono, just the dotnet
sdk.

Honestly, I’ve been amazed at how good the tools have been. For cli and
serverless dev, it’s been surprisingly great. It’s fast. C# is decent. The
cold starts are not as fast as go, but not terrible. Memory usage is low.

It’s been a legitimately positive experience. When I started the port I was
skeptical, but it is legit cross-platform. I would consider starting a project
in it for lambda... I never thought I’d say that about a MS product.

Something over there is different, and I suppose it has been for awhile. I
think it could get a lot more popular as non-ms devs realize that MS has built
dotnet to work really well on Mac/Linux cli, far away from the weird tightly-
coupled Windows/VisualStudio-hit-f5-to-do-the-magic-with-the-15-billion-auto-
generated-magical-xml-files world. It feels well engineered instead of thrown
together, which is nice.

Also, So far, I’ve pulled in no external libs other than the AWS sdk for the
port either. C# with linq is a pretty complete toolset. I’m sure I’ll pull in
more as I get more familiar, but it’s been solid on its own. Really nice
surprise.

~~~
dev_north_east
As someone eager to start (properly) learning C#, is doing so on Mac actually
viable? It sounds like it from your post but would be eager to hear your
thoughts (I only have a Mac at home to practice on).

~~~
neurobashing
I've been doing C# on a Mac w/ Rider and it's been a delight. There's a few
rough edges (using Windows/DOS style paths in the csproj breaks my muscle
memory) but it's great.

------
SimonPStevens
I want to like .Net Core, I really do. But in my opinion its just not yet
ready for serious use.

An example. If you want to use .Net Core you can't use entity framework, you
have to use EF Core, which doesn't yet support mapping to views or stored
procs, only tables.

Now you might think that's fine, maybe you only want to map to tables. But
it's the same story all over the ecosystem. Many major projects have a
separate netfx and core package, and many times the core package has
restricted functionality. You will almost certainly find a whole host of
things you need are missing.

And then you get the fact that ASP.Net Core is dropping support for .Netfx in
the next release, so if you want to use ASP.net Core you are now limited to EF
core too, which means you are making a full jump and can't just go halfway
first. And .netfx is now not going to support .net standard 2.1.

The list of incompatibilities and restrictions just goes on and on. I
certainly can't keep the full list in my head. So right now I'm not really
willing to commit to a new project of any significance on .net core because I
know there will be dozens of missing dependencies or features.

You could argue this is just want it's like at the cutting edge, and the gaps
will be filled in time. But .netfx is clearly already going into maintenance
mode, so the push to move to .net core has already started.

~~~
ajryan
We use .NET core in production and are very happy. A mixture of EF Core (for
ad-hoc queries) and Dapper (for stored procs) works just fine. Also, new in EF
Core 2.1, you can map views and stored procs just fine:
[https://docs.microsoft.com/en-us/ef/core/modeling/query-
type...](https://docs.microsoft.com/en-us/ef/core/modeling/query-types).

That's your only specific example - what other functionality are you missing?

You're not willing to commit to .NET core but you admit that NetFx is going
into maintenance mode?

~~~
wolfspider
Yes, totally agree- I worked on a project that wasn't Core but regular MVC +
EF and Dapper which surprisingly worked out well. Actually so well I started
mentioning it as a feature but really was just too lazy to redo all the dapper
stuff since it worked so well.

------
dustinmoris
.NET Core and F# are the only reasons why I still develop .NET. I really hope
the platform can break out of the Microsoft silo and attract talent from other
dev communities, because the biggest problem with .NET Core, despite the whole
OSS move, is still that the majority of C# developers let themselves happily
trap by the Microsoft marketing machinery. The average .NET developer never
even tries different things like AWS or the Google Cloud, TravisCI or
AppVeyor, etc. They just swallow anything which so-called MVPs and conference
presenters force them down the throat, primarily Azure which is by all
measures inferior to the other two and they don't even know.

Visual Studio is littered with SQL server and Azure tools which doesn't even
make sense. Either offer equal tools for all major tech or none, but this
subconscious constant selling of their own tools sickens me slowly.

~~~
BurnGpuBurn
> I really hope the platform can break out of the Microsoft silo and attract
> talent from other dev communities

The problem is often trust. Like so many Microsoft projects, to me the goal of
.Net Core seems to be to get as much people as possible on to a proprietary
language and/or get as many devs as possible onto developing stuff that
doesn't hurt Microsoft. There's no guarantee that MS will not pull the plug at
some point, and then soon after that .Net and .Net Core will start to diverge,
and MS will lure in as much devs as possible with proprietary functionality
that everybody wants but is only in .Net, not in Core. Or they'll just pull
the plug because of whatever reason, like they did with Silverlight and
Xamarin.

Don't get me wrong, I kinda like C#. But right now .Net Core feels like it's
been developed by Microsoft, not like it's open source. I'm not entirely sure
but is looks like the community developing .Net Core is made up almost
exclusively of MS people.

~~~
hizanberg
Also why I don't see .NET Core going anywhere, it's controlled by the same old
Microsoft who have a massive conflict of interest for directing everyone to
use their preferred libraries and services. Unlike every other popular
language which is typically developed with a transparent independent
governance model whose direction benefit all libraries and services equally,
instead of giving their own preferential treatment.

A good language is only part of what makes it appealing, having a large
diverse open community is often more important as it ensures mature bindings
are quickly available for new technologies and 3rd party API's, it influences
whether the language will be used to create new technologies (instead of just
playing catch up and making clones of what's in other languages), whether
libraries are able to succeed on merit so it doesn't discourage the community
to invest in developing a variety of competitive options and whether there
will be an active community available to quickly answer questions and resolve
issues.

.NET Core will never have the community of other popular languages, unless
you're happy to use Azure and want to be locked into using Microsoft
technologies there are much better platforms to risk your business on instead
of committing to one whose future is controlled by self-serving interests.

~~~
lovich
Using .net core, or even framework on other cloud providers is easy enough.
.NET Framework is tied to a Windows environment, but core isn't.

I don't get all this hate against Microsoft because they suggest or prefer
things they worked on as solutions, without actually tieing you to them. Do
you work on software for years and then tell everyone to use something else?

If it was actually tied to their other services then I could see the reason to
avoid it, but if using .net core without windows, azure, or sql server then I
dony see how you are actually tied to it

~~~
hizanberg
They still could have created a runtime where all libraries and services are
able to compete and succeed on merit and basically how every other popular
language evolves. If they want to give special first-class treatment to their
libraries and services that's their prerogative, just don't expect for others
to be investing in a biased runtime with conflicting interests where
alternatives exist as 2nd class citizens limiting them to smaller niche
communities and why it will never have the community of other popular
languages.

Unless you want to be locked into a future centred around using Azure and
Microsoft technologies, there are better, more open vendor-neutral languages
with more diverse and mature libraries you could be building on.

~~~
BuckRogers
I see that as a very negative viewpoint. For many, it's an easily embraced
negativity because it's Microsoft.

Objectively, MS simply has done more work to create a comprehensive package.
It would be a disservice to their customers to not increase integration
between it all. For the longest time, this was Active Directory. Today it's
Azure and .Net. Amazon doesn't control one of the most popular programming
platforms to do tighter integration than already exists. Oracle does, but I've
never really heard much about their cloud offering.

Microsoft has all the pieces, either it's appreciated or you can resent it.
But they are no longer forcing you to use it, it's being sold on merit and I
like what I see.

------
PhilWright
The post only mentions .NET Core, but should actually be mostly talking about
ASP.NET Core that runs on top of .NET Core. The features such as dependency
injection and Razor Pages are ASP.NET Core specific.

Microsoft have announced that they will be porting WinForms and WPF over to
.NET Core so that they no longer need the heavyweight .NET Framework. However,
this DOES NOT make WinForms/WPF cross-platform. They will still be restricted
to Windows but will allow you the benefits of .NET Core, such as allowing
side-by-side versioning.

~~~
h3h3
Microsoft.Extensions.DependencyInjection is developed as a ASP.NET Core
extension but has no dependency on it.

[https://www.nuget.org/packages/Microsoft.Extensions.Dependen...](https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection)

~~~
joshschreuder
Indeed. It's possible and quite easy to use it in a console app for example

------
unsignedint
One thing that makes .NET Core makes me special for me is PowerShell Core.

I have been coding quite a bit of PowerShell Cmdlet in C# lately, on Windows
and Linux, and it's very nice that I can pass around .NET datatypes
interactively, and in a script.

~~~
velobro
Powershell Core has allowed me to do 90% of the Office 365 administration I
need to do from MacOS and has reduced my time in a Windows VM substantially.

Very happy that Microsoft is making this effort.

------
bungie4
I just inherited a .Net core app that was a proof of concept. It's a real pot
luck of glued together functionality. I remember working in MS ASP land almost
2 decades ago and I swore I wouldn't invest a single minute learning another
proprietary MS technology.

I by and large held to that but here I sit, banging away at some C# code. This
is day 3. Did you know if you specify a path in JSON and apply it to Use
app.UseStaticFiles with a single trailing slash, instead of a double, it'll
bring down the .Net kernel in flames.

Not confidence inspiring in the least.

~~~
ajryan
You could replace .NET core in this comment with any $framework and see plenty
examples of developers misusing a tool.

------
cryptos
Besides Node.js the main competitor is is Java/JVM. C# is a bit nicer than
Java, but you can use Kotlin or Scala on the JVM. All in all I see no real
advantage over the JVM/Java world - more of the other way around, since the
.Net ecoystem is not as big as the JVM ecosystem. However competition is
always good.

~~~
marxama
I've worked a lot with both C# and Java, and C# is so superior I never want to
touch Java again. Especially since around C# 3.5, the distance between Java
and C# has grown enormous. The two benefits I can see with Java is that it's a
smaller language (easier to train junior engineers), and yes, the huge amounts
of libraries.

Kotlin/Scala/Clojure are nice, but my experience is that just because an
organization is working with Java, you shouldn't count on being able to work
with some other JVM language. At my current job, we've been forced to give up
on Clojure (a language I love) because the higher-ups have decided we should
stick to Java.

I really hope especially Kotlin will gain more traction in the coming years,
but in the meanwhile there is at least an order of magnitude more jobs in C#
(where I live).

~~~
jgalentine007
I hate dealing with checked exceptions in java.

------
gjm11
On an entirely superficial point, in case the author is reading:

> It offers developers modern tooling that can scaffold projects, build, run,
> test and deploy using incredibly easy-to-use CLI tools.

I think this is one place where the abbreviation CLI should be avoided, since
it means two completely different things both of which are somewhat plausible
here at first glance. "Command line interface" \-- even though this is a
Microsoft-derived thing, you can do everything using the command-line tools
you're used to from Unix, node.js, etc.; "Common Language Infrastructure" \--
even though this is happening on Mac and Linux as well as Windows, you can do
everything using the Microsoft .NET tools you're used to from Windows. I'm
pretty sure the first of these is the intended meaning, but I had to think
about it.

------
alexmuro
Personally the biggest advantage .NET core has for my situation is that it
creates a pool of programming talent and mindshare that I'd now be open to
hiring and working with on projects that can now be made with open source
tools in a sane environment.

I don't think it would be my go to choice for projects currently, but its an
option I would happily consider and I give Microsoft a lot of credit for
moving in this direction.

That being said so far the reasons I've had to look at it were modernizing
older .NET projects and last I looked there were so many incompatibilities be
between .NET core and .NET standard that the projects would have been almost
complete re-writes, somewhat of nullifying its advantages against other
choices, but that was a while ago.

~~~
javcasas
For us, hiring .NET core developers is very hard. The pool of programming
talent is gigantic, but it's also full of ultra-low quality developers. It has
taken us almost half a year to find a decent C# .NET developer, with an
average of 2 interviews per week on the best developers we could find.
Meanwhile the previous developer had time to construct a behemonth of Java
overengineering (Enterprise code they call it) that is taking us several
months to tear down. We couldn't fire him because we didn't have a
replacement, but in hindsight, firing him soon would have been better.

@alexmuro: best of luck finding quality in the pool of programming talent.

------
keithnz
this seems odd. The main advantage other than going faster than Node ( which
you'd expect ) is that it's cross platform and can run in containers and has
libraries.....like MOST other languages.

Not knocking .NET Core, I use it a lot... but this just doesn't seem like it
tells you what's special about it

~~~
aerophilic
I agree, they can do a better job articulating what is “awesome”.

For me personally, there are 3 main reasons that I have been super excited
about .Net core:

1\. It is C#, in my opinion the best statically typed language. The easiest
way I have described it to other folks is it is Java++. Combine it with really
good intelligence, and it is like the code “flows out of you”. Part of the
reason for that is the effort put into the language itself (getters/setters,
lambda functions, etc), but equally and possibly more important is the support
of Microsoft, so this is a language/toolset that is being used daily to make
itself better. (In my opinion this is why Jetbrains is so good, the developers
use their own tools constantly).

2\. It is cross platform from the ground up. I can’t understate how great it
is to have an alternative to java

3\. Rosleyn: being able to compile and potentially be as fast as C++

Just my 2 cents

~~~
a_imho
For someone who is not well versed in MS world, what is the C# equivalent of
the Java Streams API?

~~~
barrkel
LINQ, the IEnumerable extension methods, and IQueryable extension methods.

~~~
marxama
I'd like to point out that the extension method feature of C# is one big
reason why I like this whole story much better than the Streams API in Java.
There are often methods I wish were part of the IEnumerable interface, and
with extension methods, I can add them myself! (if they are not already
provided in, say, MoreLinq [1]). Very convenient, and a big boost in
productivity.

[https://github.com/morelinq/MoreLINQ](https://github.com/morelinq/MoreLINQ)

------
Yusho
We are replacing out homegrown PHP ERP system with ASP.NET Core MVC since
Version 1.0.

It is a blast to work with LINQ and Lambdas and I really miss it in other
languages. EF Core also matures quickly and we sucesssfully connected it to
mysql and sql server. So far there hasn't been a problem we couldn't solve in
.Net Core.

For a small side project I used .Net Core Razor Pages very productively. Only
needed the SDK and visual studio code. Planning on moving more small stuff
away from python to .net core based on that.

Really looking forward to Version 3.0 and Kestrel replacing IIS for good.

------
dodyg
If you intend to learn ASP.NET Core, check out my micro samples
[https://github.com/dodyg/practical-
aspnetcore](https://github.com/dodyg/practical-aspnetcore) (171 samples so
far).

------
jackcosgrove
.NET Core is special because it increases the portability of your .NET code in
case your cloud provider decides to jack up costs by 15% for no reason other
than you are locked in. _cough_ _cough_

------
euske
What about client-side apps? Is it possible to write a cross platform client
app with .NET Core, a la Electron way? That would be my dream framework. I've
been waiting for it for decades, seriously.

(I looked at Avalonia UI and mono/xwt. Not sure how stable/reliable they are.)

~~~
merb
At the moment there is Xamarin.Forms which actually can target osx,gdk and uwp
or wpf. which means you actually can have a cross plat gui on all platforms,
stability differs for each platform and I also did not like the mono runtime
that much, a lot of stuff is not as good as it is in the .net core runtime.

------
doombolt
When I try to run a random .Net exe file with dotnet core it will complain
about libhostpolicy.so dependency missing.

I understand that it is not supposed to run .exe files (no idea why, okay),
but overall it sounds like awful usability.

------
mcny
I would say not being actually free and open source is a show stopper but I'm
glad there's finally some progress. [https://github.com/dotnet/source-
build/issues/782](https://github.com/dotnet/source-build/issues/782)

I don't get it. They rewrite the whole think from scratch and there's still
code they can't show the source for... I have a feeling there is still push
back inside Microsoft against Scott Guttrie and the open everything crowd.

------
soulwatcher
Many of the features (Dependency injection, etc) seem only to be available for
ASP.Net Core. What about cross platform desktop applications? Do we have a GUI
layer that is cross platform as well?

~~~
EdgarVerona
Oh, the dependency injection definitely works independently of ASP.NET Core -
it's just something frequently talked about in tandem with it. Just wrote a
console app that used it a couple of days ago.

I don't know about the current status of the GUI layer, other than that I've
heard plans for WPF to be ported over to .NET Core. I don't know if or when
that will actually happen.

~~~
rpeden
Both WPF and WinForms will be part of .NET Core 3.0. They've done a few demos
of it already, and were able to port over existing apps without any changes to
the code. This even worked when using third party controls like the ones you
can get from Telerik. They just added references to the Telerik .dll's they
already had, and everything just worked.

They'll still only run on Windows, but it's a nice option for teams that want
to move their existing apps over to .NET Core and take advantage of the
quicker update cycle and improved performance.

~~~
EdgarVerona
Awesome, glad to hear it!

------
kristianp
Reads like an overenthusiastic sales piece posted here by the author to sell
their own product.

------
LeonB
I moved all my indie projects from .net to .net core, so i get the same
development model i know and love, but can host on linux.

~~~
buboard
how hard is it to port an existing mono application to .net core for linux?
does .net core run stable on linux ? I am thinking of a particular open source
server application written for .net/mono: opensimulator.

~~~
merb
> does .net core run stable on linux

it's probably more stable on linux than if you host in inside iis. hosting in
iis is a pita btw. it's easier on windows to create a service and proxy it
inside iis (if you need multiple different applications). however compared to
just systemd+dotnet+nginx it's way harder to debug if something goes bogus.

------
Double_a_92
It's one of the few halfway modern "lightweight" languages with static typing
and other full fledged OOP features.

------
wiineeth
How is ASP.NET core these days? How is it compared to node js? Is it worth
using it?

------
atsjie
I was working for a company that was making the switch from Nodejs to C#/.NET
Core.

Having taught and worked 4 years professionally with Java I believed I'd make
the switch to C# easily.

This was not the case. But not by lack of understanding C# or .NET Core.

Mainly .NET Core and C# felt like a few years back in time. A lot of
boilerplate, configuration, and a lack of libraries/alternatives.

I don't necessarily need or want a full-bodied UoW ORM when designing a
microservice. It felt like I was trying to practice DDD designed for a
monolith; while many of the programmer practices of DDD feel cumbersome when
designing a more minimal microservice. Even the concept of a "Controller"
feels misplaced for a microservice; request handler functions seem more
appropriate.

Some findings I had when I tried it:

\- Model validation is very optimistic; casting JSON numbers to strings
automatically and vice-versa. To me this feels completely unacceptable. I've
never seen something as surprising with regards to validation. While there are
ways around this that requires a lot of work and code. In the end I worked
around this by parsing the JSON input using JSON Schemas and ignore .NET Core
model validation completely.

\- The JSON deserialization is a separate step before the model validation;
throwing 500 errors if JSON is formatted improperly. If you want consistent
error handling and more than just the basic error output across your entire
application (deserialization, model validation, business rules, app errors,
etc...); good luck. .NET Core makes it difficult to achieve that goal. Same
here I used a JSON Schema parsing library to overcome most of my problems and
completely ignore .NET Core out-of-the-box features.

\- Entity Framework feels as defacto standard; where basic SQL would do in
Node or Go. It's a difficult sell to your colleagues if you'd argue EF is
redundant and overly complex for the task at hand.

\- I first tried to write .NET Core in VS Code like I do Nodejs, Python and
Golang. It worked, but I would recommend anyone to use either Visual Studio or
Rider instead. The auto highlighting, code hints and refactor tools are just
so much better using those tools. Also I frequently ended up deleting the
*.sln files and recalculate them using the CLI tool using VS Code. VS Code
support for C# + .NET Core is just not mature yet.

\- To set an environment variable in Linux the convention is UPPER_CASE. C# /
.NET Core uses UpperCase__Double__UnderScore. I know it's minor, but it just
feels weird and out-of-touch with linux devops, probably due to a windows-
first approach.

\- Lack of a popular alternatives like Kotlin or Groovy that provide a more
lean & mean approach to tackle simple tasks or build basic microservices. (I
don't count F# which is more in the functional domain)

\- No out-of-the-box support for measuring test coverage in Linux. Community
alternatives are lacking.

\- ...

I'm convinced .NET Core is a step forward for the C# community. I'm not
convinced it's a step forward for others.

~~~
zmmmmm
I had a very similar reaction. People complaining all the time about verbosity
in Java and then when I look at C# there seems even more boilerplate ... it
seems like even the most simple piece of code ends up nested 3 or 4 layers
deep and preceeded by 3 qualifiers to declare a simple variable. As a
completely random example:

[https://github.com/sebastienros/yessql/blob/dev/src/YesSql.P...](https://github.com/sebastienros/yessql/blob/dev/src/YesSql.Provider.Sqlite/SqliteDialect.cs)

And like you say, all the cited advantages of .NET Core just seem to be fixing
things that were broken compared to Java.

Yet I completely acknowledge that there seem to be a huge number of people who
really love it, and there are some clear technical advantages. And now that
Microsoft seems to be genuinely (for now) no longer hostile to open source and
mostly out of the patent-trolling business, I would be open to adopting it.
But when I actually do try it, I don't experience the advantages that I
thought I was going to.

