Computer Science

Computer Science

In this section, we explore the world of programming, algorithms, networks, and infrastructure

ProgrammingAlgorithmsComputer NetworksTechnologyInfrastructureSoftware EngineeringHardware Engineering

Related Categories

Featured Articles

Using Middleware in Express.js: A Complete and Practical Guide

Using Middleware in Express.js: A Complete and Practical Guide

/article/using-middleware-in-expressjs-a-complete-and-practical-guide

Overriding the Express API and Using Template Engines

Overriding the Express API and Using Template Engines

/article/overriding-the-express-api-and-using-template-engines

Advanced Express.js: Overriding the API, Template Engines, Debugging, and Working Behind Proxies

Advanced Express.js: Overriding the API, Template Engines, Debugging, and Working Behind Proxies

/article/advanced-expressjs-overriding-the-api-template-engines-debugging-and-working-behind-proxies

Database Integration in Express.js: A Complete Guide to Popular Node.js Database Drivers

Express.js does not include built‑in database support, but its flexibility allows you to connect it to virtually any database system simply by installing the appropriate Node.js driver. This article provides a complete overview of how to integrate Express with many popular SQL and NoSQL databases, including installation commands and example usage.

/article/database-integration-in-expressjs-a-complete-guide-to-popular-nodejs-database-drivers

The Assert Module in Node.js: A Complete Guide

The node:assert module provides a set of assertion functions for verifying invariants in Node.js applications. It supports both strict and legacy modes, throwing an AssertionError when conditions fail. The module also includes the AssertionError and Assert classes, which allow for advanced customization and independent assertion instances.

/article/the-assert-module-in-nodejs-a-complete-guide

Asynchronous Context Tracking in Node.js

The node:async_hooks module provides tools for tracking and managing asynchronous contexts in Node.js. . Its two main classes, AsyncLocalStorage and AsyncResource, allow developers to store and propagate state across callbacks and promise chains. This functionality is similar to thread-local storage in other languages and is essential for managing state across the lifecycle of asynchronous operations such as web requests.

/article/asynchronous-context-tracking-in-nodejs

Async Hooks in Node.js: A Complete Guide

The node:async_hooks module provides an API to track asynchronous resources in Node.js. . However, this API is experimental and its use is strongly discouraged due to usability issues, safety risks, and performance implications. For most use cases, AsyncLocalStorage or Diagnostics Channel are recommended alternatives. Still, understanding Async Hooks is useful for learning how asynchronous resources are created, executed, and destroyed.

/article/async-hooks-in-nodejs-a-complete-guide

Buffer in Node.js: A Complete Guide

The Buffer class in Node.js represents a fixed-length sequence of bytes. Many Node.js APIs support Buffers for handling raw binary data such as files, streams, and network protocols. Buffers are subclasses of Uint8Array and extend it with additional methods. They are essential for efficient binary data manipulation in Node.js applications.

/article/buffer-in-nodejs-a-complete-guide

Buffer in Node.js: Writing Data Methods

The Buffer class in Node.js provides a wide range of methods for writing data into binary memory. These methods cover signed and unsigned integers, floating-point numbers, big integers (bigint), and strings. They support both big-endian and little-endian formats, making them essential for binary file handling, network protocols, and low-level data operations.

/article/buffer-nodejs

Node-API in Node.js: A Complete Guide to Native Addon Development

Node-API (formerly N-API) is a stable API for building native Addons in Node.js. . It is independent of the underlying JavaScript engine (such as V8) and maintained as part of Node.js itself. Its primary goal is to guarantee ABI stability, ensuring that modules compiled for one major version of Node.js can run on later versions without recompilation. This makes Addon development more reliable and future-proof.

/article/node-api-in-nodejs-a-complete-guide-to-native-addon-development

Node.js C++ Embedder API: Running JavaScript from C++ Applications

Node.js provides a set of C++ APIs that allow developers to execute JavaScript inside a Node.js environment from C++ applications. This is useful when Node.js is embedded as a library within other software. Unlike typical Node.js code execution, embedding Node.js

/article/nodejs-c-embedder-api-running-javascript-from-c-applications

Node.js Child Process API: Executing Subprocesses

The node:child_process module in Node.js provides the ability to spawn subprocesses, similar to popen(3) in Unix systems but not identical. The most important function is child_process.spawn(), which creates a child process asynchronously without blocking the event loop. Other functions such as exec, execFile, fork, and their synchronous counterparts (execSync, execFileSync) offer different ways to run commands or scripts depending on the use case.

/article/nodejs-child-process-api-executing-subprocesses
Computer Science | Dr. Shahin Siami