Engineering · · 8 min read
.NET or Node? Choosing between the two stacks that run most business software.
The Microsoft stack and the JavaScript stack are both excellent, and both are surrounded by myths. What each is really good at, what each costs, and how to choose without starting a religious war.
By Precision Code Studios, Engineering team
Ask ten engineers which technology a new product should be built on and you will get a confident answer from each, usually the one they already know. Two families come up more than any others for business software. One is the Microsoft stack: C# and .NET, running on Azure, with SQL Server underneath. The other is the JavaScript stack: TypeScript on Node.js, React in the browser, PostgreSQL for data, on whichever cloud you prefer.
We build in both, which gives us no reason to sell you either. This is the comparison we give clients when they ask, with the marketing taken out.
What each one actually is
- The Microsoft stack. C# as the language, .NET as the runtime, ASP.NET Core for web applications and APIs, Entity Framework for data access, SQL Server or Azure SQL as the database, and Azure as the cloud. One vendor designs the pieces to fit together.
- The JavaScript stack. TypeScript as the language, Node.js as the runtime, a web framework of your choice, React for the interface, and usually PostgreSQL. No single owner: it is assembled from open-source parts maintained by many companies and communities.
Three myths worth retiring
- ".NET only runs on Windows." It has been open source and cross-platform for years. Modern .NET runs on Linux and in containers, and most new .NET systems we see are deployed that way.
- "Node is for small projects." Some of the largest consumer services in the world run on it. With TypeScript and discipline, it carries large systems perfectly well.
- "Choosing Microsoft means lock-in." A .NET application runs on any major cloud. The lock-in risk comes from the cloud services you build around it, and that is true on every platform.
Where the Microsoft stack is strong
Its great virtue is coherence. The language, the framework, the tooling and the cloud are built by the same organisation, released on a predictable schedule and supported for years. There is usually one obvious, well-documented way to do a thing, which matters enormously in a system that thirty people will work on for a decade.
- Performance. .NET is a compiled, multi-threaded runtime and consistently strong on heavy computation and raw throughput.
- Type safety from the ground up. C# was designed as a typed language. Whole classes of mistake are caught before the code ever runs.
- Enterprise integration. If the business lives in Microsoft 365, Active Directory and Dynamics, single sign-on and data access are close to native.
- Stability. Long-term support releases and careful backward compatibility mean fewer forced rewrites.
Where the JavaScript stack is strong
Its great virtue is reach. The browser only speaks one language, and with Node that same language runs on the server. One team can work across the whole product, share code between both sides, and move from idea to working prototype very quickly.
- One language everywhere. Types, validation rules and utilities are written once and used in the browser and on the server.
- The largest ecosystem in software. Whatever you need to integrate with, someone has almost certainly published a package for it.
- A deep hiring pool. JavaScript is the most widely known programming language, which makes teams easier to grow.
- Excellent for input and output. Node handles many simultaneous connections efficiently, which suits APIs, real-time features and anything that mostly waits on other services.
The costs people forget
Neither runtime costs anything: .NET and Node are both free and open source. The differences are around them. SQL Server carries licence fees that PostgreSQL does not, although on a managed cloud database you are paying for a service either way. The JavaScript world's freedom has its own price: an application can depend on hundreds of small packages from hundreds of authors, each one a thing to keep updated and a possible security risk. A .NET application typically leans on far fewer, from fewer sources.
How to choose
- Start with the team. A strong .NET team will outbuild a mediocre Node team, and the reverse, every time.
- Look at what you already run. A company built on Microsoft systems gains a great deal by staying close to them. A company of web developers gains by staying in TypeScript.
- Consider the shape of the work. Complex rules, heavy processing and long life favour .NET. Interface-heavy products, rapid iteration and real-time features favour the JavaScript stack.
- Think about who you will hire. Look at your own market, not a global survey.
You do not have to pick only one
The comparison is often presented as a contest, and in practice the two cooperate. One of the most common and most successful arrangements we build is a React interface in TypeScript talking to a .NET API on Azure: the reach of one with the rigour of the other. Because both sides speak plain web standards, neither needs to know what the other is made of.
A technology choice should serve the product and the people building it. Both of these stacks are mature, fast, well supported and capable of carrying a serious business. Choose the one your team can run well, and spend the argument's energy on the product instead.