Menu

5 Reasons Why I'm Switching Over To Node.js in 2022

5 Reasons Why I'm Switching Over To Node.js in 2022

The majority of my almost 2 decade career has revolved around C#, ASP.NET and SQL Server for the most part, and I’d like to think that I’ve gotten pretty good at it.

3 years ago though, I began to teach front-end coding for an online bootcamp that revolved around the MERN stack. For those unfamiliar, MERN stands for MongoDB, Express, React and Node.js. And there are other variations to this Node stack, such as MEAN (with Angular) and PERN (with PostgreSQL).

Since that time, I’ve become a big fan and advocate of the technology. Development has just been faster, more fluid and with fewer of the issues that frequently visited me while working with .NET and other frameworks in the past, such as complex configurations and finding a cheap Windows hosting platform.

But there’s a few other reasons too that caught me by surprise.

5. Node.js has grown in popularity

Back in 1999 Java and C++ were the reigning champions when it came to selecting a programming language. Nobody would have guessed that just a few years down the line, the language designed to generate ad pop-ups would become the #1 most popular language in the world.

Don’t take my word for it. The StackOverflow survey paints it as clear as day. Not only is it the most popular scripting language, but it’s been the most widely used language for the past 9 years. That’s a very impressive feat to say the least.

I attribute much of that popularity to Node.js, the runtime that takes JavaScript from the client and into the server. Because overall, JavaScript is a lightweight scripting language without any fancy bells and whistles. It’s relatively easy to learn and it can run in pretty much any environment.

You can literally open up Notepad, type a few characters, and have a fully functional application that can pretty much run on anybody’s browser wherever they are in the world.

Compare that to something like C#, which relies on the .NET Framework to compile, which itself is composed of hundreds (if not thousands) of classes, properties and structures. You might also need to setup and manage ORM’s, like Entity Framework in the process.

That steeper learning curve will undoubtedly mean less people will be willing to spend the time to learn it.

4. Setup is faster

One of the biggest pain points when it came to working in a .NET environment for me was the process of setting up the development environment. And not just clicking on the “Create new app” button and then watching a “hello world” app appear. Because there’s more to it. Alot more.

For one, I have to decide whether I’m going to work with a .NET MVC project template, or perhaps a Web Pages one with Razor. Even Web Forms are still around in some capacity. I also have to decide whether this will be a .NET Framework application or a .NET Core application.

I might also need an ORM in my app, meaning having to setup Entity Framework (or Entity Framework Core). And truth be told, I don’t really like using EF, so I usually forget how to set it up each time.

Needless to say, setting up a .NET application feels like a chore often times.

I haven’t felt myself going down those rabbit holes when working with Node.js. The only real question I typically ask myself is “Is this going to be a React app, or maybe Next.js?”.

A few npm install commands later and I can pretty much have a full application ready to be deployed to the cloud within minutes.

And that fluidity just makes programming a much more pleasant experience and helps me focus on the actual application logic, and not so much on which .config file needs to be created and which runtime needs to be downloaded.

Onboarding other developers to join me on a project has also been a pretty seamless process with Node. Once they clone the right repo and run a quick npm install command, they are essentially ready to go.

Combine this with the previous reason of having a larger talent pool, and you can start to see the bigger scope.

3. More hosting options

For a long time I struggled with finding cheap Windows hosting for my ASP.NET websites. And what I did find usually wasn’t on the more reliable side of things. Downtime was frequent and one time, the hosting provider that I was using pretty much shut down unexpectedly leaving me with a 500 error home page for days.

Most Node.js hosting platforms use Linux machines underneath, meaning that overall costs are pretty low and resources very high on their end.

And unlike the Windows options, which are typically unknown companies from some part of the world, Node.js cloud platforms have worked hard to become highly reputable and respected vendors. Such companies include Heroku, Netlify and Vercel.

Most of these platforms offer very generous free tiers as well, meaning that you can deploy your apps quickly without having any out of pocket costs. Again, this is something that is lacking in the shared Windows hosting community.

2. Prebuilt templates

Whether you want a portfolio, an eCommerce website or a blog, odds are there is some JavaScript starter code somewhere that you can download with a single command.

Most other languages and frameworks do not have this benefit. They are often times so tightly coupled to their own code and configuration that generalizing them in any way is an almost impossible task.

JavaScript is pretty flexible though. The ability to import and export modules with a single line makes for a relatively smooth process when creating reusable components.

And the ability to run multiple versions of the same library in a single application just adds to this overall robustness.

1. Community

The full-stack front-end community is a force to be reckoned with. And if there is someone to thank for the success of JavaScript and Node, it’s definitely them.

If you have any bug, issue or question about anything related to a Node.js framework, I can assure you there’s probably a video or article online discussing it in detail. And to me that’s the biggest benefit of all.

Because having content being generated around the clock by professionals from all around the world, means that I personally spend less time troubleshooting my code.

These frameworks and libraries are also open-sourced projects with developers doing pull requests around the clock. In the end that just means more stable code, as bugs are found and fixed more rapidly.

I’m not completely saying goodbye to .NET however, as I still operate many websites build in C#. It’s also where I have far more skill as a developer as well. But I will be saying ‘hello’ to Node, and welcoming it into my professional space in the coming years. And I’m definitely looking forward to seeing just how far it can go.

Walter G. author of blog post
Walter Guevara is a Computer Scientist, software engineer, startup founder and previous mentor for a coding bootcamp. He has been creating software for the past 20 years.

Get the latest programming news directly in your inbox!

Have a question on this article?

You can leave me a question on this particular article (or any other really).

Ask a question

Community Comments

No comments posted yet
Ad Unit

Current Poll

Total Votes:
Q:
Submit

Add a comment