You Had Me At Node.js
Tags: node, javascript, discuss, tutorial
Published: 2021-04-06 15:36:28

Ah, Node.js, the handy dandy, tried and true, fast and easy, lightweight and scalable, JavaScript runtime environment. (Yes, that’s the official technical definition 😆). There are a couple reasons I’d like to take a Node-first deep dive today: 

* We recently hosted a [global livestream event](https://www.youtube.com/watch?v=13YHkG7F6oQ), where you can code along to Build a Node.js CRUD app with HarperDB 
* HarperDB is the [first and only database written in Node.js](https://dev.to/harperdb/building-a-database-written-in-node-js-from-the-ground-up-2hgm), so we’re kind of big fans
* It’s been a while since we’ve done a Node.js appreciation post 
* Shall I go on, or did I have you at Node.js? 

The (actual) technical definition of [Node.js](https://en.wikipedia.org/wiki/Node.js) is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the [V8 engine](https://nodejs.dev/learn/the-v8-javascript-engine) and executes JavaScript code outside a web browser. (So, Node.js is actually not a framework or a library). Node came out around 2009, the [npm](https://www.npmjs.com/) package manager was released the following year, and the world has never been the same ever since. Ryan Dahl first introduced Node.js as an open-source project, which was then sponsored by Joyent. Now used for both front end and back end development, Node.js is highly performant and designed to build scalable network applications. It operates on a single threaded event based loop to make all executions non-blocking. It can handle tons of concurrent connections with a single server, avoiding the burden of managing thread concurrency. [Node.js](https://nodejs.dev/learn) has a “unique advantage because millions of frontend developers that write JavaScript for the browser are now able to write the server-side code in addition to the client-side code without the need to learn a completely different language.”

###Pros of Node.js 

* Easy to learn
* Lightweight, scalable, and performant
* Fullstack JavaScript, can serve both client and server-side applications 
* Support of large and active community; npm 
* Handles requests simultaneously 

Why do developers love Node.js? The team at HarperDB can speak from experience, as they decided to build a database from the ground up in Node.js (you can learn more about this somewhat crazy endeavor [here](https://dev.to/harperdb/building-a-database-written-in-node-js-from-the-ground-up-2hgm)). Generally, Node is lightweight and scalable, enables rapid development, and npm has incredible packages. [It promotes](https://www.altexsoft.com/blog/engineering/the-good-and-the-bad-of-node-js-web-app-development/) efficiency and overall developer productivity as well as code sharing and reuse. One amazing benefit of using Node is as technology is advancing, most of the cool stuff that you want and need is on npm. The community has already done the heavy lifting for you and there are tons of free tools available. 

Node.js is great for use cases like real-time web apps, chat and messaging apps, social media, multiplayer games, collaboration tools, API, and even databases! :) 

What about the other side of the coin? The list is short, but let’s discuss the potential downsides of Node.js. 

###Cons of Node.js

* Does not have direct control of the Operating System/File System 
* May not be as performant as C/C++ (depending on project/use case)
* Potential performance bottlenecks with heavy computation tasks
* Relies on callbacks

[One author](https://www.altexsoft.com/blog/engineering/the-good-and-the-bad-of-node-js-web-app-development/) states that one of the main drawbacks of Node.js is its inability to process CPU bound tasks. It is worth noting that there is a native [Node.js threading library](https://nodejs.org/api/worker_threads.html) available that addresses this issue, but out of the box, node is single-threaded. Additionally, due to its asynchronous nature, Node.js relies heavily on callbacks, the functions that run after each task in the queue is finished. While callbacks can be a powerful feature, they open the door for complex and inefficient code if not properly understood. C/C++ can be faster, but can also be more complicated and not necessarily as scalable horizontally. 

##Global Livestream: Build a Node.js CRUD App with HarperDB!
 
What are your thoughts? Are you already a member of the Node.js appreciation group, or maybe you haven’t had a chance to check it out yet? Either way, you’re in luck! You can [check out the livestream](https://www.youtube.com/watch?v=13YHkG7F6oQ&list=PLlgTMTKsypS7FCGm3jAzq6VppF8-AtzPh) to learn about Node or expand upon your current skills, while building your own Node.js app.

We were excited to host [Idris Olubisi](https://twitter.com/olanetsoft), a Software Engineer and Speaker based in Nigeria, as he built a Node.js CRUD application with HarperDB. HarperDB offers unrivaled flexibility, protection, and value for almost every use case, and we'll do it all with a single installation that can run in the cloud, on-premise, and at the edge. CRUD is essentially the basic functionality of an application that deals with Creating, Reading, Updating, and Deleting records. And you’re already familiar with the awesome benefits of working with Node.js! 

__Meet Idris__: 
This month’s guest speaker, Idris Olubisi, is a Software Engineer, Technical Writer, and Speaker based in Lagos, Nigeria. He is a Contributor for GatsbyJS and Mentor & Technical Coordinator for She Code Africa. He has extensive experience in the entire project life cycle, from concept to implementation to integration. Idris is an expert at problem-solving, technical leadership, communications, and presentations.

All are welcome! This free virtual code along will be followed by Q&A with Idris and the HarperDB team, so bring your questions. (If you’d like, you can also check out HarperDB’s Node.js SDK available at the [Marketplace](https://studio.harperdb.io/resources/marketplace/active?utm_source=devtomargo&utm_medium=node) or on [npm](https://www.npmjs.com/package/harperive)). 


<br>
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvnsb3czkhu2r2cn3btq.gif)