Language: EN

introduccion-curso-nodejs

Introduction to Node.js

Node.js is an open-source code execution runtime environment used to run JavaScript code on the server side.

That is, Node.js is a program that allows us to run programs written in JavaScript. You write your program in JavaScript and the function of Node.js is to take your code and execute it (that’s why it’s called a “runtime environment” 😉).

When we say “on the server side” we mean that, thanks to Node.JS, JavaScript no longer has to run exclusively within a web. But this does not mean that Node.js is only for servers.

You can install Node.js on your home computer, and use it for whatever you want. For example, to write your home shopping list, and you forget to buy sweet potatoes 🍆. Or to list the files in a folder… to do the program you want.

node-js-javascript-server

Happy JavaScript running on your computer

When Node.js appeared it was a small great revolution. It was 2009 and neither computing, nor JavaScript, were like they are today. At that time, JavaScript was (almost) exclusively executed in the browser, when it displayed a web page.

Until then, server-side technologies were mainly based on languages such as PHP, Ruby, Java, and Asp.NET. There was no runtime environment to use JavaScript, apart from a web browser.

But Node.js changed everything. Now we can run JavaScript to perform tasks, outside a web page, such as managing files, interacting with databases, and creating web servers on your computer (or on a server).

How Node.js Works

Node.js is based on Google’s V8 engine, which compiles JavaScript code into machine code, rather than simply interpreting it. This makes it highly efficient and extremely fast.

node-js-v8

Not that kind of engine, but almost

One of the most innovative aspects of Node.js was its non-blocking I/O operation model. This allows handling multiple requests simultaneously without blocking the execution flow.

Another feature is an event-driven programming model. This means that operations such as reading files or network requests are handled as events. When an event occurs, the corresponding callback is executed. This makes Node.js very efficient in handling asynchronous operations.

These three characteristics were aimed at serving scalable, high-performance web applications that catered to a large number of requests. Such as online chats, multiplayer games, collaboration applications, and more.

Node.js as a Development Tool

Regardless of Node.js arising as technology for creating the back-end of web applications, the truth is that it immediately began to be used for many other things.

Thus, many tools focused on improving the developer experience began to be created. If, say, you had to copy some files on your computer (not on a web server, on your computer), with Node.js you could write a simple script.

nodejs-herramientas-desarrollo

By using JavaScript, web developers felt very comfortable using the same language they already knew and used every day. There was no need to learn another language, you could use JavaScript for everything.

Both Node.js and JavaScript benefited from this. So many (I repeat many) tools were developed to help you in development. It is a circle that feeds itself.

This generated a great community of developers and a wide user base. This means that there are a lot of resources, tutorials, libraries, and frameworks available to help in application development.

In addition, many leading companies such as Netflix, PayPal, Uber, and LinkedIn use Node.js in their applications. This gives it more weight and reliability, which favors other companies to use it as well.

So much so that today Node.js is an essential tool in the world of development. Not only as a web server, but because literally almost anything you want to do today in development, requires using Node.js.

Of course, like everything that is successful in life, competitors and alternatives have also emerged. But, in general, trying to be Node.js-Compatible because if not they would not eat the snot has become almost a de facto standard.

And for that reason, we start this Node.js course where we will see the use of this tool that, today, you should know yes or yes if you are in the development world.