Quo Vadis NodeJS?

Quo Vadis
NodeJS?

Vadis NodeJS

Introduction

Web applications are critical for the success of every business.

From the early beginnings of the 1990s, the key question was how to create them efficiently and to deliver the right solutions as fast as possible with good performance and a low cost of development.

Web application development traditionally is a tandem of at least two languages, usually the server side language (PHP, Java, Dotnet, Python, Ruby, Go) and Java Script on the client side.

We know from our work with CIOs and CTOs that traditional choices are being questioned as part of the technology evolution. Let’s analyze NodeJS briefly as an alternative for Java or DotNet core for building enterprise applications.

→ Explore more Web apps – all the things you don’t have to do on your own

Long story short

JavaScript was very useful, but in browsers it is a slow executing interpreted language.

Suddenly, with the meteoric rise of Google Chrome, a new much faster V8 engine was available as an open source project (2008).

The idea of the NodeJS creators was ‘let’s use this engine not in the browser but on the server, to create back-end web applications.’ In this way everything can be done in a single popular Javascript language, as it is supposed to reduce the cost of development and enable front-end developers to participate more in the back-end development; well, at least the language was no longer a barrier to that.

→ Explore Generic API or Back-End for Front-End? You can have both.

On top of that, the NodeJS team added the introduction of a non-blocking IO – to the application, which was revolutionary at the time. It didn’t have to wait for the completion of network and disk operations, but continued to server the requests in a continuous event loop.

The idea was to use a single thread for the event loop in order to make it easier for horizontal scalability.

Pros

Cloud friendly

All the cloud providers, both major and local, are very open to supporting NodeJS. It’s available virtually everywhere. The engine is small and fast, and the single threaded nature makes it easy for horizontal scalability, enabling it to launch thousands of NodeJS containers efficiently with each of them consuming just a single CPU core.

There are also optimized NodeJS variants with multithreaded execution engines and other improvements.

Development environments

NodeJS is available on all platforms, including Linux, MacOS and Windows. The engine proved to be portable and highly compatible.

NPM is known to everyone in the software industry, with its thousands of libraries and tools.

There’s an entire lively NodeJS ecosystem.

Active development

It’s not without troubles (famous io fork, changes of leaderships and owners) but there’s no doubt it’s under active development with a clear support strategy for stable releases, timeboxed development and a delivery process.

→ Read more How to turn Try often, fail fast into Try often, succeed often

Community

The NodeJS community is large and active and there’s always a solution for your technical problem to be found online, as it’s highly likely that someone else has had similar problems.

It works!

There’s no doubt the underlying engine works. If you happen to read the articles on Chrome, the new Edge, or Opera, it’s highly likely that JS parts are rendered by the V8 engine, which is the foundation of NodeJS.

On the server side the list of companies using it include: Netflix, LinkedIn, Trello, Uber, PayPal, Medium, eBay, and NASA, as well as  Google and Microsoft (incl. GitHub).

Mature ecosystem

Express.js and other advanced frameworks built on top of NodeJS make it even easier and more efficient to create web and microservices backends.

There’s a mature ecosystem ready to pick up the components and frameworks and use them to help you build your apps.

Disappointments

Despite its initial and promising growth in popularity, it did not dethrone Java as the primary language for creating enterprise back-ends, and it’s also less popular than Microsoft DotNet (core and classic).

The majority of enterprises use it mostly as a supporting environment for less important parts of applications or for quick prototyping when the back-end component is temporary.

Of course there are also notable exceptions in the enterprise world, but popularity statistics are not on the side of NodeJS.

And needless to say, almost everybody uses NodeJS for front-end development build systems. It’s hard not to.

Polyglot reality

A single language benefit is not as important as it seems. We live in polyglot times when developers or development teams know multiple languages and ecosystems and use them to build complex enterprise digital products.

It’s inevitable anyway, so it makes the primary benefit of NodeJS simply less attractive.

Back-end traditions and plans

NodeJS has been with us over the past ten years, but Java and DotNet still dominate the landscape.

In our survey about the future of business applications we saw the sign that decision makers are moving away from traditional Java, but there’s no guarantee that they will choose NodeJS as a future replacement. Our survey suggested it would be more likely DotNet Core or Python, than the JavaScript engine.

Not good enough for large applications?

It’s quite common that when Javascript is referred to (heard or read) that its dynamic and loose nature are not a good fit for complex business applications.

It was very true before, during the old times, but currently we have a more object oriented ECMA 6 and the ability to write entire backends in TypeScript, which helps to manage the complexity with stricter type control. Now, especially in the context of small microservices, it’s not as strong an argument anymore.

In other words big applications are already divided into microservices, so they are tens or hundreds of small services.

Performance

According to the tests in the typical loads, Java or DotNet core applications are faster on the same hardware. So the old argument about the miracles of non-blocking IO and a callback based event loop enabling scalability no longer holds water. Non blocking IO is available for the competing technologies and performance is no longer an advantage of NodeJS over Java or DotNet.

Overuse?

Another popular opinion is that NodeJS is overused and its applications should be even more limited than they are today. Overuse of NodeJS was even called an anti-pattern!

Future

NodeJS is here to stay, but unlikely to take over the world of business applications. The limited application of the technology doesn’t mean it’s not the right choice in your particular business context.

The NodeJS community would like it to be the primary choice, but they were unable to convince the majority of the technological decision makers to choose it.

No matter if you’re Java or DotNet traditionalist, or want to continue/start the adventure with NodeJS for business applications, Avenga’s software team is here to help you with both, the best way to choose and the effective implementation.

True knowledge about any given technology comes with experience and we are open to sharing it with you.

Avenga experts

What is NodeJS good for? And when would you like to use something else? Is it an underappreciated technology or an overused technology?

Andrew Petryk, Java Engineering Manager

I am biased in this question. I don’t like NodeJS. Stop, I’m sorry . . . I hate NodeJS. A backend with JS is like a web frontend with Java; one shouldn’t do that. There are plenty of proper languages like Java, Kotlin, Groovy, Python, and Go. My personal opinion is: Use them and remain happy.

Vladyslav Litovka, Solution Architect

Nodejs has it’s weak and strong sides, as the one who is actually working with  nodejs I would like to highlike strong sides:

  • Non-blocking single threaded asynchronous event loop
  • It’s allows to write front/back ends using the same language and moreover even sharing not only libraries(npm packages) but also data models, classes etc
  • Development speed
  • It’s can be executed almost everywhere
  • It’s good for IoT
  • It’s good for serverless
  • It’s allows frontend and backend engineers to better understand each others code and business logic

For sure it has its own army of haters and weak sides but in the end there is no ideal tool which will serve any purpose.

Other articles

or

Book a meeting

Call (Toll-Free*) +1 (800) 917-0207

Zoom 30 min

* US and Canada, exceptions apply

Ready to innovate your business?

We are! Let’s kick-off our journey to success!