JavaScript

Monkey patching in NodeJS

Reading Time: 3 minutes Hey guys, I am back with another blog in my series of blogs on mocking in nodeJS, so if you have read my last blog, in which we looked over how we can use sinon for testing in nodeJS to effectively mock and stub behaviours, so in this blog we would look over the concept of monkey patching to make things more testable, so let’s Continue Reading

Spies and Stubs in NodeJS

Reading Time: 3 minutes Hi folks, my last two blogs we discussed about how we can use monkey-patching to test complex code logic which could be difficult to test if it is not used, along with that we also looked over how can stub or mock behaviours of our dependencies using sinon, in this blog we would be exploring more utilities provided by sinon i.e; Spies and Stubs. Spies Continue Reading

Prevent user from losing unsaved data

Reading Time: 3 minutes There are many instances where a user fills some details in the form, edit their details, or secure the form in such a way that if someone navigates away or closes the browser tab, they should be prompted to confirm that they really want to leave the form with unsaved data. Whenever these kind instances occur you will see an alert appear on the top of Continue Reading

ngRx with Redux in Angular

Reading Time: 4 minutes In this blog, we will see the basic pattern of Redux and some benefits and some high-level concepts of redux and then we will discuss the brief about ngRx and its basic implementation. Redux: Redux is a predictable state container for JavaScript apps. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of Continue Reading

Ionic Page LifeCycle Events

Reading Time: 3 minutes As we know Ionic pages are nothing but internally it is converted into an Angular component only as we all know Ionic frame is built on the top of Angular. And just like Angular Framework has its lifecycle hooks which we follow during the development of Web Application, Similarly, we have some interesting lifecycle events for ionic framework too which can capture and perform some Continue Reading

Angular Router: Parameter with the snapshot

Reading Time: 3 minutes The Angular Router is a powerful router library that allows developers to implement advanced functionality in their Angular applications. Earlier what we were doing if we want to send the value of the parameter from one component to the other we were makes use of the @Input decorator to get hold of that value that was being passed in from one component to the other. But, Continue Reading

Getting started with Svelte

Reading Time: 2 minutes Svelte is a lightweight modern JavaScript library (4.57KB minified) intended for use on projects where legacy browser support is not necessary. It uses modern JavaScript (querySelectorAll, classList, matchesSelector) to help make it as lightweight as possible and therefore only works on the latest version of modern browsers E.g. Chrome, Firefox, Opera, IE10+. Svelte is used to develop cybernetically enhanced web apps. Why Svelte? Svelte is Continue Reading

What’s New in Angular 8

Reading Time: 3 minutes I am sure you all are excited about the Angular 8 release, So your wait is over now. In this blog, we will discuss newly introduce features and also discuss the breaking features which is partially introducing a feature which is yet to be developed completely and will introduce in Angular 9. Angular 8 is finally here and includes a preview of Ivy, service worker Continue Reading

Introduction to callbacks in Node.js

Reading Time: 2 minutes If you are familiar with JavaScript, you may have got acquainted with the concept of callbacks. If not, no worries, as here we will be discussing some basics of callbacks and how they actually work with respect to node.js. You may already know that the type of JavaScript functions is Object. So, just like any other object such as Array or String, we can pass Continue Reading

Dockerizing a NodeJS app with Redis

Reading Time: 2 minutes Hi folks, in this blog I would walk you through how can we seamlessly dockerize a NodeJS app along with redis, So as we know that docker is a pretty decent way of streamlining and making the process of deployment easier, efficient and pluggable, so let’s gets started but before that, the prerequisite for the blog is a basic understanding of docker

Drag N Drop using Angular 7

Reading Time: 4 minutes Drag and Drop is one of the new features which is provided by Angular 7. Angular 7 makes it very easy to implement this feature. So here, in this blog, we are going to learn how to drag and drop the items from a list of numbers using a basic example. Before getting started with the implementation there are some basic pre-requisites which is necessary Continue Reading

Working with Arrays using D3.js

Reading Time: 3 minutes In general, whenever we are using D3  we are using for data visualization and if we try to understand the term data visualization in depth then it is nothing but it is a result of a lot of data manipulation using Array. So before starting working with Arrays using D3.js let’s get the understanding of Arrays briefly. ARRAYS: Arrays is used to store the collection of an Continue Reading

Unit Testing of Angular Service with HttpClient

Reading Time: 4 minutes Services are basically used to allow your code to share the common functionality across the application. Services play a vital role in every Angular application and promote the reusability of code. And to verify that our services are working properly or not we need to test it using unit testing. First and Foremost thing we’ll do is to create the service which is to be Continue Reading