After 10 years of .net development, I wanted to use Nodejs for a mid sized application. I am Just sharing my experience.
Windows footprint
Most of the new apps are deployed in cloud today. For a Asp.net we need windows, though it works on Linux using mono, I am not confident enough about performance. Windows server alone requires more than 750mb of ram, I wanted deploy my app on 1 GB memory server to reduce the cost. So I wanted tiny OS. Linux is proven for it. In this case Linux wins, hence node js.
However I believe Windows Nano Server can address this in near future.
Now .Net (core) runs on linux
.Net Core
Now .net core is the next Node JS. It has open the door for C# to run on Linux and Mac. Unity, Xmarin allows to create mobile apps and games too. We can now create .net standard library that can work on .net core, framework, xmarin and Unity.
Best time for C# developers.
Quicker to code
I can code well in C# as well as on js. So this is not a problem for me...
Code clarity
This is an important area. When the code base grows everything get complex in JavaScript. One person’s javascript may not readable to another person. Many .net projects has large codebase but it is easily readable and Debuggable. A normal skilled team can manage C# codes in better manner. For node js the team has to be highly skilled in JS. Average programmer may not read JavaScript properly.
Simplicity
nodeJS is very simple, No dlls, no GAC, No classes. It is tiny, really tiny code. But "Code Clarity" is important for me than the number of lines I write. For me simplicity means easy to read, not quicker to code. I feel C# is simpler than JS when the code base grows.
Performance
This is debatable. I feel I can write good performance apps using both the technology.
Open Source libraries
Nodejs wins here. Too many packages, it is like tons of varieties in your breakfast. It was hard for me to choose what I want. I spent a week on ORM libraries for NodeJS, looked around Sequlizer, Sails, Knex, all of them is great. But there are people completely re-coded their app from one framework to other. That clearly shows that every framework is missing something. This never happened to me in .net world. I am happy with Dapper, and Service stack ORM lite.
But we have more choice in node js, so if we choose properly everything is going to be fine.
Docker
Docker is cool one. Who will say “I don’t want it”? This is the main thing I wanted for windows. I heard Microsoft already doing something. We have to wait and see…
Platform portability
Node js can run on almost on any OS, so what? I am going to use one type of OS. AWS provides very few variations of linux. For me it doesn’t matter what OS my app requires, my worry is how much cost it is. In this case Windows and Linux are almost same priced by cloud providers. The only reason I like linux is It has very small footprint. Windows is not. As I mentioned Windows Nano will address this. So I am Ok to run my app on windows server.
Now .Net core runs on linux so in docker.
Finally I decided to use C# and web api. The main reason is my existing experience on it. However I will look back to node js for my next app.
No more look back. Will continue with C# for server side, and react JS for client side.