Posts

RxJS

Image
 RxJS: Reactive Extensions for JavaScript We need RxJS to handle asynchronous data easily  Asynchronous data: Data from HTTP response, data from a port, user click events, timer etc Observer and Observable Observer: RxJS object that emits data stream Observable: Entity that  is listening to the stream In order to initiate communication between data and listener in RxJS scope, first they need to be converted to "observer" and "observable" Observer subscribes to the observable to listen to the data stream Use of "subscribe:" Used to listen to the data stream OPERATORS Operators are small pieces of code that can be applied as pre-processing logic before data comes to the listener Summary of common operators: map:   used to manipulate responses from the API filter: used to filter values based on condition. Same as ES6 filter but this is for Observable merge:  This operator combines a number of observables streams and concurrently emits all values from ever...

JavaScript Buzzwords: Closures, Hoisting, Currying, Event Loop, Bind/Call/Apply

Image
1.     Closures JS by itself is not a language that is OOPS friendly. In order to mock the Abstraction/Encapsulation in the traditional OOPS, closures are used. A closure is just a pattern of writing a function (here function is treated as a “class”) Without Closures: No matter how many times you call CounterTest(), the  count  value is always “generated” fresh and hence  count   always increments from 0 and returns 1. But, what if you had to preserve the count value and on each call, it had to increment based on the previous result. Ex:  Closure to the rescue!   With Closures: Summarizing: ·          Child function has access to parent function’s private variables. ·          Parent function returns the child function and only exposes this to the outside world (Abstraction/Encapsulation) ·          Outside functions ar...

Azure DevOps : How to Host Angular 8+ application - CI/CD Implementation

Image
Deployments have never been easier! All the buzz words might sound complex and scary. But it is really simple and easy to learn.   You can understand and implement the CI/CD pipeline in Azure in less than a day. It does not take much time to grasp the overall idea.   Without further delay, lets get to the working of it.   If you are completely new to cloud and its concepts, please checkout this link: . It is hardly a 5 minute read.   Pre-requisite Have an Azure account Have at least one basic angular application ready in GITHUB repository Overall idea: Create an App Service here :  https://portal.azure.com/#create/Microsoft.WebSite Link this service later during the CI/CD Pipeline creation Creation of App Service Service is created in the Azure App Services. Azure Portal:  https://portal.azure.com/#home This is the screen you will be redirected to on clicking of the above link. Here, create a new Servic...