Map Hold key-value pairs Remember the order of insertion. Can have objects or primitive values as key or value. Map is a JavaScript object which can hold key-value pairs  and remember the order of insertion. Maps inherit from  Map.prototype. Map.prototype.constructor returns the constructor function that created an instance’s prototype. A new Map is created using the map constructor in the following way. [crayon-5dee6271bde0903604314...

Security is the biggest concern while building web applications. Most of the web applications handle a lot of sensitive data and it is necessary to provide adequate security to protect this data from perpetrators. This series of articles discuss various security issues, types of attacks and guidelines to be followed for building a  secure application. Front-end    The basic security features that should be implemented in every web applica...

While working with Node.js and Angular, sometimes you might need to set some custom values in Response Header from the server-side and get these values in your Angular application. These values can be some tokens, keys or anything. This article is about completing this requirement. Server-side using Express.js and Node.js To set a custom value in the response header, you have to write the following code in your Express.JS server [crayon-5dee6271...

1 What is typescript? It is a strict syntactical superset of JavaScript, and adds optionaltype-checking along with the latest ECMAScript features. 2 What is two way data binding in angular? Two-way Binding. Data binding in AngularJS is the synchronization between the model and the view. When data in the model changes, the view reflects the change, and when data in the view changes, the model is updated as well. Binding   3 Types of bindings ...

While creating AngularJS applications,we might need to send multiple  http requests to backend apis to fetch the data that need to be populated within our HTML.In most cases, these backend apis might be protected using token .Also we might need to add a loading image to indicate the user that the data is being fetched. HttpInterceptor helps us to a display the loader image before and hide the loader image after completing the request  and also...

Angular 1.6 SPA server side pagination of data with sort. To create a SPA which lists user data with pagination  and sorting we need the following CDN links – Angular JS 1.6.9 js CDN. – Angular JS UI bootstrap -Bootstrap components written in pure AngularJS . – Bootstrap CSS file. STEP 1 – Create file index.html and add the relevant CDN links using the following codes. [crayon-5dee6271cea02935691619/] STEP 2 – CREA...

HttpInterceptor –  feature in Angular 4.3. We may need to intercept Http request while building apps with Angular. Sometimes we may you need to intercept Http request to add something to request header or to do something with the response. We can use Http Interceptor to do some action when sending  a request.This can be achieved using  the following interceptor class which implemenets Httpinterceptor.The interceptor adds an ‘acces...

Node.js is an open source server environment which lets us write server side code in javascript. Node.js is asynchronous,single threaded and non-blocking .Node.js has very high memory efficiency which makes it very popular in server side  developement for web/mobile app.In this article we take a look at how to start of web developement in Node.js with Mysql as database. To install Node.js in your linux run the following command in the terminal [...

Filter function in javascript filters an array based on a given criteria and returns new array.For example if we want to get all elements in an array divisible by 2 as a new array,we can use filter function [crayon-5dee6271d334b028811406/] Just for a reference check what the map function gives in return [crayon-5dee6271d3358179058124/]   Now lets’s go back to filter function.Lets see how filter function works on array of objects. [cray...

  Javascript strings are immutable.But javascript objects and arrays are mutable.A mutable object is an object whose content can be modified after it is created. An immutable object is an object whose content cannot be modified after it is created. Consider an the following example [crayon-5dee6271d3e65984938629/] Now,from the above we realize that arrays and objects in javascript are mutable,ie they can be mutated. Functions like slice retu...



Understanding Microservices, Web services, APIs and Endpoints
architecture , Uncategorized / December 4, 2019

Many beginners who start development, especially back end, get confused with terms like APIs, Microservices, Web services, endpoints, etc. The aim of this article is to describe what these terms are with a simple example. Please note that the example given here is just a demo. Microservices Microservice Architecture is a way of designing the structure of an application. Microservices are independently deployable services that together m...

Understanding Cloud service models IaaS, PaaS and SaaS – Cloud 3
Cloud , Uncategorized / December 3, 2019

You might have heard acronyms like IaaS, PaaS, SaaS, what do they actually mean? what are cloud service models?. This is the third part of the Cloud Series and aims to provide an answer to the above questions. This article will provide you with an overview of cloud service delivery models so that you can choose which service model is best suited for your business application.   Cloud service models Cloud service models are models,...

Difference between tilde (~) and caret (^) in package.json, Semantic Versioning of npm packages and npm audit for vulnerability fixes
interview questions , Uncategorized / November 27, 2019

In the package.json files of  Node.js applications, the dependencies are added specifying their version. Sometimes these version numbers can be preceded by tilde (~) and caret (^) characters. What do they actually intent and what is the difference between them?     Semantic Versioning of npm packages Consider a version of a package like 1.2.3                It is of the form MAJOR.MINOR.PATCH MAJOR in version is updat...

Understanding Cloud Deployment Models. Cloud Part – 2
Cloud , Uncategorized / November 21, 2019

For part 1 of this series visit the following link What is Cloud Computing and Why? Cloud Part – 1   Cloud Deployment Models represent the types of cloud environments used by business organizations depending upon access, ownership, and size. There primarily  4 types of cloud deployment models Public Cloud Private Cloud Hybrid Cloud Community Cloud All these models provide various IT Resources as services Public Cloud A Public c...

What is Cloud Computing and Why? Cloud Part – 1
Cloud / November 18, 2019

Welcome to Cloud Series. This is the first article in the Cloud Series and aims at explaining what is cloud and its benefits to absolute beginners. Business organizations require plenty of computing resources/IT resources to run their businesses. These resources include servers, storage, network, various software, services, etc which are necessary for setting up and maintaining the business services provided by the organization. IT/Comp...

Understanding Map object in JavaScript

Map Hold key-value pairs Remember the order of insertion. Can have objects or primitive values as key or value. Map is a JavaScript object which can hold key-value pairs  and remember the order of insertion. Maps inherit from  Map.prototype. Map.prototype.constructor returns the constructor function that created an instance’s prototype. A new Map is created using the map constructor in the following way. [crayon-5dee6271bde...

Q: Handling errors while using Async/Await (JavaScript ES8)

This article aims at providing an insight into handling errors while using async-await. In the below example, a  function TestPromise will return a promise.The promise will give an error and get rejected if the value of the variable budget is less than 20000. The promise will always get rejected as we initialize the value of  budget to be 10000. A function calltestAPromise calls the function TestPromise.   [crayon-5dee6271...

Beginners guide to installing and setting up MongoDB and GUI for MongoDB in Windows Machine
databases , MongoDB , Uncategorized / September 26, 2019

This is a step by step tutorial for installing MongoDB and setting up a GUI for MongoDB on Windows OS   Step – 1 Check whether MongoDB is already installed in the system To check whether MongoDB is already installed in the system, and the PATH variable is configured, use the following command. This will output the version of MongoDB . [crayon-5dee6271bee04288418109/] The following command will output the Mongo shell version [...

Node.js – tools/packages/practices for building a secure,high performance API with quality code

Contents >Code standard and styling >Security >Performance         In this article, we will take a look at some important aspects to be considered while developing Node.js applications and the tools/packages/practices that can be used to achieve them. Understanding and using these will help you in building a secure web application that is well structured and well documented and has a very high performance. C...

Guidelines for building a secure Web application/Mobile application – Part 1 Front-end

Security is the biggest concern while building web applications. Most of the web applications handle a lot of sensitive data and it is necessary to provide adequate security to protect this data from perpetrators. This series of articles discuss various security issues, types of attacks and guidelines to be followed for building a  secure application. Front-end    The basic security features that should be implemented in every w...