Translator: Karen

The original link

Premise:

Welcome to the world of Web back-end development. Before delving into this topic, let’s review the prerequisites. A website has two parts, the “front end” and the “back end”. ** The front end of a website is usually the end of the user’s interaction with the site, the site’s user interface (U.I.). ** Simply put, it contains all the elements we can see and interact with loaded in a computer web page. Sometimes referred to as the “client” of a web page. Back-end development refers to server-side development, which involves all the activities that take place in the background outside of the web page screen.

What’s going on behind the screen? The back-end of the site is composed of servers, applications and databases, focusing on the architecture of databases, scripts and websites. When we type the URL in the browser, the request is sent to the DNS server. DNS parses the IP of the URL and sends it to the browser so that the browser can request the site’s host. To some extent, we can think of the server as the heart of the network. The database is responsible for storing data and is the source of data rendering to the client. It’s a lot like the brain of the web. ** A database server is a server that provides database services to computers and other computer programs, defined according to a client model. ** Likewise, the ** application server is a software framework that provides both the capability to create Web applications and the server environment to run those applications. ** It is important to remember that databases and database servers are not the same thing. Again, applications are different from application servers.

Introduction:

Now, let’s get to the point. **Node.js is JavaScript built on Chrome’s V8 JavaScript engine, according to the official Node.js documentation. ** Before confusing the terms used here, let me break down the official definition. When we run JavaScript code or use any JavaScript framework, the code is executed in the browser. So, in this case, our browser is a JavaScript runtime environment. Convert JavaScript (JS) code into machine code with the help of a JavaScript parser. For Google Chrome it’s V8, for Firefox it’s SpiderMonkey, and for Microsoft Edge it’s Chakra. Node.js relies on several libraries to function properly.

Among the most important: Chrome’s V8 and LIBUV

Without V8, Node.js would not be able to understand the JS code we write in the Node.js environment. **LIBUV is an open source library that focuses on asynchronous I/O. It can access operating systems, file systems, networks, etc. ** is also responsible for the two main functions of Node.

1. Event loop.

2. Thread pools.

In addition to these, Node.js also relies on:

1. Http-parser is used to parse HTTP.

2. C-ares for DNS requests.

3. OpenSSL for encryption.

4. Zlib for compression.

We’ll cover all of these points in an upcoming post. But first, let’s focus on the basics. In short, Node.js enables developers to write command-line tools in JavaScript and allows scripts that run on the server side to generate dynamic Web content on the server side, which is then sent to the user’s Web browser.

Node.js features:

1. Fast, efficient and scalable.

2. Event-driven non-blocking I/O model.

3. Asynchronous in nature.

4. Single thread.

5. It’s open source.

6. Use only one language on both ends of the site.

Hope you enjoyed the introduction to Node.js (Part 1). For more information, check out the next blog introduction to Node.js (Part 2)