Well is .NET still worth learning in 2019?
The short and boring answer would be, yes. But I assume you're not here for a quick and boring answer, are you? You're probably
here because you are considering which language to learn in 2019. Or maybe you're a greenhorn and would like to dip your toes into
the vast waters of programming. Well in this article I'm going to try and convince you to give C# a try.
Exciting time for C
Just a few weeks ago we were figuratively blown away by some of Microsoft's announcements regarding windows, .NET and C#. Chief among them
being:
- Fluid web framework that aims to make the web a more productive and interactive place
- Windows terminal inspired by it's linux counterparts, aims to improve developer efficiency
- a full linux kernel within Windows with WSL 2.0
- KEDA and event driven scaling extension for Kubernetes
- IOT Plug and Play does it need more hype than that?
- Machine learning for .NET named ML .NET 1.0
- and much much more
in short, it's an exciting time to be a .NET developer whether you already have a background in coding or you are just entering the field.
A world of opportunity career and otherwise awaits you.
Game Development with .NET
C# has always been a favorite of game developers worldwide, and it strikes a good balance between performance, low level, oop and easy of coding
with some syntactic sugar gently sprinkled in π₯ π₯ . Now here's a fun statistic almost half the games are made using Unity 3D
Now I am fully aware Unity 3D supports both Javascript and C# as their programming languages. However, one can assume a vast majority of devs
opts for the language that sacrifices less performance, which would, of course, be C#.
With Unity 3D you can create anything from Mobile, PC, and even VR games. So if you're looking to make your future in game development
look no further than C#.
Rich Job Market
.NET has been a highly sought after skill for well over a decade now. Just a quick search for .NET jobs on Monster.com gives us a staggering
result of 30155 Jobs Found
. While average salary statistics show that C# developers are still amongst the highest paid developers out there.
So you shouldn't have too much trouble finding employment in the field nor will you go hungry or wanting.
Backed by Microsoft
Hate them or love them they are undoubtedly one of the largest and most successful companies in the tech world. One thing Microsoft
was always good at was making sure their development ecospace is of top quality. You can be sure that tools such as Visual Studio and Visual Studio code will
work effortlessly with your technology stack. You can also rest assured that the language and framework will be regularly updated and kept simple and concise for many years to come.
Not just Windows anymore, it does Linux and Mac now too.
Since the release of .NET Core 1.0 Microsoft has been putting in a lot of work trying to open source as much of their stuff as possible.
With that finally came official support for Linux and OSX, which means you can now use official C# libraries on Linux or a MAC without having to
resort to using Mono. This means you can have the best of both worlds a fast and efficient Linux server with lighting fast C# running your websites, webapps or services.
speaking of which...
It's BLAZINGLY fast
And I mean FAST, it still outperforms Java, NodeJS and most of the competition, the only languages that can boast about being more resource friendly and therefore fast would be
C, and C++. However, their speed and performance come at a price. In both of them, you have to take care of memory management and trash collection yourself. While C# has a built in trash collector that
Does a pretty damn good job of cleaning up after itself π₯ π₯.
it comes with built in pun functionallity
Don't believe me observe:
Why do Java developers wear glasses
because they can't C#
Native mobile application
By using Xamarin you can write fully native mobile applications for both Android and iPhone without having to support two different codebases.
This enables you to develop your mobile apps faster and more efficiently. The only thing you need to figure out now is how you're gonna spend all that extra time you'll have.
I heard the outdoors are supposed to be good for you.
C# is multifunctional
With C# you can write anything from games, mobile apps with Xamarin, desktop applications, web applications, websites and webshops. There are only a few languages out there that are that multifunctional
and none of them is as clean and nice to look at as C#.
Top comments (60)
Growing up on .NET, I became a bit biased. I love C# and ASP.NET core. In the meantime Angular and React took over the front-end world, and Node and Express are working to create the Isomorphic stack. If I were a new programmer I'd skip C# and Java and learn server side Javascript using Node and Express.
This still sends chills down my spine whenever I hear it!
Ya, I'm sure, just like we (C# and Java people) laughed at Javascript back in 1990.
While I can see where you are coming from, I have to point out that the always async nature of Node.js is a pretty big issue for beginners, furthere more I personally find that Nuget packages are much better maintained and in better hands than the vast majority of npm packages.
Especially when we consider that the most important nuget packages are all created and maintained by Microsoft themselves, whereas NPM packages are mostly created and maintained by random developers that can stop maintaining or cause comparability issues for various reasons.
As a long-time user of .Net and recent JavaScript full stack developer with node, it is my opinion that nuget packages are pretty difficult to work with compared to npm packages. These days there are a greater variety of simpler to use npm packages than there are nuget packages. Again, just my personal experience
I actually wrote an article covering this very topic over here: dev.to/arctekdev/the-contenders-202d
While it's true that NPM has a greater choice of packages they are all for the most part maintained by third party developers. This means that at any given moment a spat between two developers could cause conflicts between their packages, or the package you relly on could simply stop being maintained all together, or completely changed for no reason at all.
On the otherhand you have fewer choices with nuget but a large portion of the most important nuget packages are maintained and created by Microsoft themselves, meaning that you have a greater sense of stability and trust that those packages will exist and function as intended for the next 10+ years.
Most big npm packages have a team of multiple devs behind them. Also, the async stuff from nodejs was inpired by c# (async / await)
Matei, very interesting! Tx.
Artec wrote "important nuget packages are maintained and created by Microsoft themselves, meaning that you have a greater sense of stability and trust that those packages will exist and function as intended for the next 10+ years."
All true as long as MSFT doesn't throw us under the bus. Like they did for SilverLight, WPF (which was never completed), their ridiculous fractured desktop environment (UWP) and now .NET. Sure .NET Core is going to be good, but didn't Java say in 1991 (build once run anywhere)? Microsoft just learned that lesson starting with their .NET Core concept a few years ago ~
Whyever?
Latest TechEmpower results as of the time of posting this:
techempower.com/benchmarks/#sectio...
As you can see, Node.js is so far behind ASP.NET Core in all tests, it's not even a contest any more.
As for front-end C#, here's an example: n-stefan.github.io/diabloblazor
It is a port of this: d07riv.github.io/diabloweb
replacing React/JavaScript with Blazor/C#.
Being static it doesn't use a server at all, but server side prerendering (initial rendering) is baked into Blazor and can be used with sites that are hosted by an ASP.NET Core server. There's also server side Blazor, which doesn't need WebAssembly and still behaves like a SPA/PWA - no full page reloads, uses differential rendering, etc.
Edit: added further benchmarks
.NET Core/C# wins 10/10 tests vs OpenJDK/Java:
benchmarksgame-team.pages.debian.n...
At the same time OpenJDK/Java wins 9/10 tests vs Node.js/JavaScript:
benchmarksgame-team.pages.debian.n...
It should be noted that both the TechEmpower tests and these benchmarks were run on Linux. On Windows .NET Core/C# would likely be even faster.
Do you have some benchmarks between C# (asp) and node.js ?
No, nor should you worry too much about benchmarks between languages/platforms/frameworks and so on.
They are one of many matrics.
I cover this exact thing in my other post: dev.to/arctekdev/the-contenders-202d
Where I discuss how small percentage differences in resource usage usually do not matter when you are developing out in the real world, because no developer always writes perfect code in a perfect way. And even if they do that developer would be a lot more expensive per year than simply buying a new server.
I'm just trying to find what makes you say that it outperforms Node?
You are not listening, focusing on benchmarks and it's minimal performance differences is not a good idea as it's an unimportant metric in most cases.
But if you wish: ageofascent.com/2019/02/04/asp-net...
techempower.com/benchmarks/#sectio...
This one is a year old and I'll go out on a limb and assume not too much has changed in a single year.
As you can clearly see .NET outperforms NodeJS in most categories.
Not a surprising result to be perfectly fair.
Stop being condescending please. I don't care that much about benchmarks but I'm looking for the proof behind what you said:
Btw, are we not seeing the same result or something? because it seems that it's quite the contrary, we clearly see that node outperforms aspnet on must of the benchmarks, here's one (of many) as an example:
If we take Round 18 from TechEmpower and adjust the filters to add aspnetcore we get some different results which are very much in favour of aspnetcore
Shane Booth I'd recommend not feeding the troll much more, he appears to be a bad faith actor.
Agreed - i'll leave it there :)
I politely asked you to give some proof, how does that make me a troll ?
And how am i of bad faith since i used the link that you gave me?
Im pretty sure i saw some version of nodejs running on the jvm which outperformed c# in all categories but i cant find the link rn (when ill do ill post it here)
What is faster is ASP.NET Core with Kestrel. Open the filters and enable "Kestrel" in the "Front-end server" section and then make sure "asp.net core" is enabled in the "Framework" section. Make sure to click on the "Apply changes" button.
skylinetechnologies.com/Blog/Skyli... I'm struggling to find a more recent benchmark on nodejs vs net core, though.
Well, nodejs isnt that great for heavu computations, but its awesome when talking about a lot of concurrent requests
NodeJS is good for multiple requests, no doubt about it, the benchmarks on TechEmpower(which are linked to in other comments)do suggest that netcore is more performant however. But then again, performance alone shouldn't be the deciding factor on choosing a tech stack.
I suppose I could try running some when I get home, that is if I don't have too busy of a day at the office.
Basically saying no promises but I'll try and keep it in mind.
I normally never reply to any posts online, but wanted to say thanks for this article. To the troll: if you don't agree with the post, read something else, or watch some porn and you'll feel much better
In C++ you can take care of that yourself, or you can use dedicated smart pointers, which takes care of it for you.
And it would be nice to note that only the .Net core is available for Linux. You can be as experienced as you want, but you'll still have problem finding jobs because of the confusion between the core and the framework. IMO that's on purpose, so it's really a bit far-fetched to say it works on Linux...
The programming language with the basic library? Yeah. The whole system? Certainly not.
Why do you feel that? The project started out as providing a core framework that works across all platforms. .NET Framework is being sunset in favor of .NET Core (and post-2020, just .NET 5+)
Jobs are a-plenty depending on your market. No, they're probably not in Silicon Valley startups where everyone's on the js binge, but in other markets, the positions are flourishing (surprisingly to me, the Midwest).
What do you feel C#/.NET are missing? Your comment is missing a lot of context.
Before 3.x which just released a month ago, this was plain not true. You did not have access to various GUI frameworks and some more niche items.
Also missing nuance. If your workflow was using Visual Studio for everything, you didn't have much knowledge of cli tools. Using the cli can be pretty important for .NET Core.
Javascript in Unity (Unity script) has been deprecated since 2017. C# is the only official scripting language, at least until the planned visual scripting is released.
Really? I haven't developed/played with Unity in ages. I was not aware of this.
For what it's worth, the .NET Core team have started rewriting some of their C++ code into C#, which in some cases has actually made it faster.
A lot of that speedup is due to being able to avoid marshaling data between managed (C#) and unmanaged (C++), but it's still worth noting that just because some code is written in C++, doesn't mean it's faster than C#. The C# JIT can do some advanced optimizations at runtime that aren't possible with a language that compiles directly to machine code with no JIT compilation.
The Kestrel web server for .NET Core is faster than both Nginx and Node.js, even though Nginx is written in C while Kestrel is written in C#. techempower.com/benchmarks/#sectio...
Short version: Yes
That's about the jist of it yea.
I often get asked by other developers or better yet accused of working on legacy software or webapps when I mention that I'm a dotnet developer.
.NET Core 3.x π
Wonderful improvements
Actually ASP.net core really outperform Node.js:
here is proof link:
techempower.com/benchmarks/#sectio...
I never used .NET in any of my project so in my opinion it's not really about the language. There are many other alternatives, and you should choose them according to your need. Nodejs, ruby, python, c#, etc..., they are all have the good and the bad.
I fully and whole heartedly agree with that sentiment.
There is the right tool for every job. However with languages like C# and Java that have a high level of flexibility in terms of where you can use them and what you can create with them. The golden hammer problem becomes more and more likely.
That is that with a golden hammer every problem becomes a nail in your mind and you only wish to use your shiny golden hammer.
I usually like to steer clear of tribal language/framework/library arguments and comparissons and instead like to simply highlight differences between the languages themselves.
I found that this makes people focus a lot less on asking "what's better" and a lot more on asking "what would I rather use" or "what would suit my needs better at this moment"
EDIT: Sorry for the wall of text. I try to avoid them as much as possible.
I mean, for me personally the golden hammer is nodejs w typescript
Hey, I precised it was my opinion, and didn't try to say anything negative, I was just surprise to see this post as #opensource and was reacting with the best of my knowledge, without trying to be rude with anyone.
If I can't comment anything, what's the point of commenting anything at all?
And it's really not like I hijacked another comment thread, I started a new one, so really, why are you so butt-hurt?
Read my post again, with the knowledge that I didn't know about this new release, and you'll clearly see that I'm not really criticizing anything, just commenting about something that was clearly my own opinion (as expressed by the common idiom "IMO"), and as soon as I learned about my lack of knowledge on this subject and my actual error, I expressed it also.
So now if you don't want people to express any kind of opinion at all, why are you even on internet?
Some comments may only be visible to logged-in visitors. Sign in to view all comments.