Creating & Applying SSL certificate for Secure Websites

Assuming y’all are aware about secure sites and usage of https. This aim to shed some light on how it works in background. Moreover it will follow upon creating SSL certificates, and setting up HTTPS in Node.js server.

Comparing HTTPS with HTTP

This will not introduce to HTTP, but y’all know that Chrome communicates with web server using HTTP protocol. Default HTTP protocol is regarded as insecure since client communicate with server using plain text without encrypting, hence exposed to intruders.

Hence HTTPS protocol is introduced to secure communication between client and server by encrypting data. …

Using Effect Hook to handle SocketIO interactions

This article assumes that you are aware of the basics of React Hooks and Socket.IO and follow up on these articles to get familiar with these topics:

This builds up a demo chat application involving rooms integrated using React hooks. The client can connect and switch between chat rooms, where updates will be replicated by events. Depending on the selected room it will broadcast chat messages to socket clients using that room.

(Once running, we can spin up multiple browser tabs and see if chat messages are updated through sockets.)

Setup SocketIO Server using Nodejs

Let’s create a Node server with simple…

In any ecosystem involving multiple projects or multiple developers, there might be common code segments where it may be duplicated. This duplicated code can lead to unmaintainable code bases in the long run where minor changes have to be replicated to many codebases to make it consistent.

Hence maintaining code bases with common segments to share across projects is a general practice and there are few ways to integrate code bases. This sharing code can be private and domain-specific when it's shared within the projects of the company. …

How Git internals work to organize data and history

Most developers are familiar with version control system and git is de facto choice for most cases. This article is actually to introduce how git works, and this will enable for developers to understand git better.

Git is distributed version control where history of file and directory changes are stored such that developers can travel through time to gather how all the changes happened. Initially git was created by Linux creator to manage Linux kernel development when having multiple open-source developer.

In Linux manual pages (man git), Git is identified as “the stupid content tracker”. …

Using chmod and chown to work with permissions and ownership

Users familiar with Linux based operating systems should have at least once come across issues related to Permission denied when executing some commands in the terminal. This article aims to shed some light on user permissions and ownership related to files and directories.

In order to get an introduction to permissions and ownership, in the terminal, navigate to a location where files resides and execute ls -al to list files and directories with all associated details.

drwxr-xr-x  12 bibi         staff     384 16 Mar 11:19 public
-rw-r--r-- 1 bibi staff 1660 16 Mar 11:51 note.txt

Let’s break down what each segment…

Offload tasks to a spawned process to unblock the main thread

Node.js is single-threaded by design, thereby requiring it to keep the main Node process unblocked to continue execution. Moreover, Node is limited to one thread and 1.76GB (for 64-bit OS) memory usage. Thus, external processes are required to offload CPU intensive processing in parallel. The child_process module in Node allows us to spawn processes that can be used for any task to be run in parallel.

Builtin Node.js module: child_process

The Node module child_process allows us to create new processes and to offload tasks to be processed in parallel in the background without blocking the single main thread. …

Single threaded JavaScript into asynchronous non-blocking I/O model using Event Loop

Hope y’all are familiar with basics of node.js and how its a popular choice for making server applications. This article aims to shed some light on node.js architecture and how it works internally.

JavaScript on browser and JavaScript Runtimes

JavaScript language is popularly used for web pages and to make them interactive. Thereby javascript code is required to be interpreted by browsers to show as web pages, and this is done by JavaScript Engine.

JavaScript Engine is used to convert JavaScript code into machine code to be executed. …

Part 4: Build layered architecture for separation of concern, scalability and maintenance

From previous articles of the series it was demonstrated to setup REST API and architectural changes to separate concerns into repositories, controllers.

However for better modularity and separation of concern, separate layers can be configured for each process. Hence each layer is independent of each other and can be replaced by multiple implementations if needed. Layered design of REST API can be used to demonstrate usages of this architectural pattern.

Each of these layers should be Single Responsibility to avoid tight coupling and to support Separation of Concern. (Note that tiers and layers are used interchangeably but there is slight…

Part 3: Add transaction support for repositories

Hope y’all are familiar with ASP.NET Core articles following up to here introducing WebAPI and Generic Repository Pattern. If needed to follow up or for quick keep up please check up on:

Why Unit of Work?

Transaction support and connection management is essential in an application architecture. Simply given business scenario should entirely succeed or entirely fail and not remain in partial condition. As an example, let's consider A transferring 10 to B and that business scenario can be written in following pseudo code:

transfer(from A, to B, amount 10) {
A = A - 10
B = B + 10

This should…

Part 2: Separate database concern & avoid repetitive code

Hope y’all are familiar with ASP.NET Core and how it can be integrated with database through EF Core. Feel free to follow up on previous article on this:

Why Repository Pattern?

Previously database context were configured and used to interact with database. Repositories are used to create abstraction between database access and business logic. Thereby usage of data, and access of data is separated where repository will manage interaction with database. This can be clearly seen in N-Tier architecture that is designed for separation of concern, and ASP.NET Core Web API can be also be modeled as N-Tier.

From above diagram it is…

Udara Bibile

Full Stack Developer | BiBi

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store