Introduction to Node.js (Part 1)
Welcome to the world of Back-end web development. Before we dive deep into the topic, let us brush up the prerequisites. A website has 2 parts, the "Front-End" and the "Back-End". The Front-end of a website generally refers to the side of the website with which the user interacts. It's the User Interface(U.I.) of the website. In simple terms, it consists of all those elements which we see and interact with after the web page loads in our computer. It is sometimes also known as "Client-side" of the web page. The Back-end development refers to the server-side development that is back-end is about all the activities happening behind the scenes of a website.
Now, what happens actually behind the scenes? The back-end of a website consists of a server, an application and a database, mainly focuses on databases, scripting, and the architecture of websites. When we type a URL in our browser, a request goes to DNS server. The DNS resolve the IP for the URL and send it to the browser so that browser can request that host for the website. To some extent, we can conclude servers as the heart of the network. Databases are responsible for storing data and it is from where the data is rendered to the client-side. It is much like the brain of the network. A database server is a server which provides database services to computers and other computer programs, as defined by the client–server model. Likewise, an application server is a software framework that provides both facilities to create web applications and a server environment to run these applications. It has to be remembered that database and database server is not the same thing. Similarly, an application and an application server is also different.
Most important are: Chrome's V8 & LIBUV.
If V8 was not there then Node.js had no way to understand, the JS code we write in the Node.js environment. LIBUV is an opensource library with strong focus on asynchronous I/O. this gives access to OS, file system, networking and more. This is also responsible for 2 main features of Node.
1. The Event Loop.
2. The Thread Pool.
Apart from all of this, Node.js also depends on:
1. http-parser for parsing http.
2. c-ares for some DNS request staff.
3. OpenSSL for cryptography.
4. zlib for compression.
Characteristics of Node.js:
1. Fast, efficient and highly scalable.
2. Event driven, non-blocking I/O Model.
3. Asynchronous in nature.
4. Single Threaded.
5. It's Open Source.
6. We use only one language at both ends of the website.
Hope you like the Introduction to Node.js (Part 1). To learn more follow the next blog Introduction to Node.js (Part 2)