Redis Official Logo

Why caching is so important:

Caching is the process of storing copies of files and data in a cache or some temporary space. By the use of caching, we fetch data very quickly. The best example of a caching tool is Cloudflare. I know Cloudflare is not the only caching tool, it is having other functionality also.

There are two main reasons for using caching in the application:

  1. Less response time.

Process of Caching:

The process of caching is so simple. Suppose you want to get some data from an API. In the first call, you will…

In the web applications, sometimes a user will be disconnected from the network. At this time how the application will perform. So, if you create a good app, so it is must detect when the user goes offline and behave accordingly. In some of my freelance project, I was facing this type of problem. After that, I referred HTML5 MDN for working with offline and online events.

For creating a good application, you must know when the user goes offline and write logic accordingly. There is some use-case when detecting offline and online events are important.

Use-case 1 :

When a user is…

Every HTML element having display property. Display property tells to web page how an element will render on the web page. By default, all elements of HTML having inline display property. By using of User Agent stylesheets, some elements like div, section, ul having block display property.

User agent style sheets are overridden by anything that you set in your own style sheet. …

process is the core module of Node JS and we don’t have a need to install this module. You can simply access this module by require method.

const process = require('process')

Exponent power of a number:

We get the power value of exponent over the base number by using three methods:

  1. By Looping: for loop and while loop.
  2. Recursive method.

Math.pow( ):

Reverse a string :

In JavaScript, you can reverse a string by three ways:

  1. Using decremented loop.
  2. Using of recursion function.

Using default methods:

Reverse a string by using three default or built-in functions:

  1. reverse() // reverse the array.
  2. join() // join the element of the array.

Chaining all three default methods:

Today we are discussing class constructor and ngOnInit. This is very frequently asked question in the interview if you are going for an Angular Developer.

Angular developer sometimes writes some code in the constructor which are related to angular and sometimes they getting undefined because constructor calls before creating the component.

Now here, we are discussing constructor and ngOnInit.

If you want to see original article, please go to The Dev Family

Constructor will call first after that ngOnInit will fire.

What is constructor :

A constructor is not the concept of Angular. It is the concept of JavaScript’s class. …

In modern time, JavaScript stack is booming in the software development field. All companies like JS technologies like Node JS, Angular, React, Vue, Express, etc. So, in today’s life of a software developer is incomplete without the JavaScript. Today we will discuss OOJS (Object Oriented JavaScript) main concept: Objects.

Introduction :

Object-oriented languages are identified through their use of classes to create multiple objects that have the same properties and methods. JavaScript is slightly different from other class-based programming languages because, in ES5, there was no concept of the class keyword in the JavaScript. ES5 is all about functional programming. …

Aggregation by pipeline

Today we are discussed about Aggregation in MongoDB. Aggregation is the process of grouping the multiple documents and perform any operation and getting the single result. In this medium story, we will take a look at how to create the basic transformation of documents using aggregations.

There are 3 ways to perform aggregation on MongoDB documents:

  1. Map-Reduce Function
  2. Single Purpose Aggregation Methods

Basic Syntax :



MongoDB aggregation framework using the data-processing pipeline. MongoDB documents are processed by aggregation pipeline and give the aggregate result. The pipeline method using the MongoDB native methods like a $match, $group, $sort etc.


Now in this medium story, we can create a simple APIs in Express JS ( Node JS Framework ). In this story, we can create a CRUD (Create, Read, Update, Delete) APIs. If you are new in the Node JS and want to learn how to create the basic server and create a basic APIs in Node JS, please read my medium story: Create HTTP Server in Node JS

Create a project in Express :

If you are new to Express framework and doesn’t know how to create a project in Express.js, please refer my medium story: Setup Basic Server with Express Framework.

Vaibhav Sharma

Software Developer and Freelancer

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