Async/Await in Node.js/JavaScript–Part1
In the previous few posts we have discussed on Promise in JavaScript and how it helps to solve the issues related to callbacks resulting in more readable and maintainable code.In this post we will...
View ArticlePromise in Node.js/JavaScript–Part IV
In the last post, we have seen how we can sequentially execute promises using Promise chaining via the Promise.resolve and Array.prototype.reduce functions. In this post, we will see how we can execute...
View ArticlePromise in Node.js / JavaScript–Part III
In the previous post, we have seen Promises can be chained together by returning another Promise object from the onFulfilled parameter of the then function. The chain of Promises executes sequentially....
View ArticlePromise in Node.js / JavaScript–Part II
In the previous post, we have discussed about the basics of Promise, here we will take a deeper look into the Promise.then function. The code below shows the promisified version of the add function...
View ArticlePromise in JavaScript / Node.js–Part1
As we have discussed earlier callbacks are the basic building blocks of asynchronous programming in JavaScript/Node.js , they are used for notifying when an asynchronous operation is completed. But...
View ArticleAsynchronous Control Flow in Node.js with async Library
The two common asynchronous control flow patterns include sequential and parallel flows. In the sequential flow, the tasks are executed one after the other in sequence and delay in one causes a delay...
View ArticleCallback Hell in Node.js/JavaScript
A callback is a function which is passed as an argument to another function and invoked with the results generated after that function execution is completed. The result is propagated to the callback...
View ArticleCircular Dependency in Node.js ES Modules
In the previous post we had discussed about circular dependency in Node.js modules using CommonJS modules specification.Here we will examine the behaviour of Node.js modules using ES Module...
View ArticleCircular Dependency in Node.js Modules
In this post we will examine how the module initialization in Node.js is affected by the circular dependencies ( we will restrict this discussion to the CommonJS specification based module system) I...
View Articlemodule.exports vs exports in Node.js
Let’s start by developing a simple ( or sample) Node module as shown below. The file mymodule.js contain the following lines of code to expose two functions with the properties a and b using the...
View ArticleASP.NET Core Middleware Part – II
In the last post we have discussed the basics of ASP.NET Core Middleware and how it fits into the request processing pipeline. As a next step we will see how we can build the middleware pipeline using...
View ArticleMemoization Using C#
Memoization is a technique very commonly used in Functional Programming to improve the performance of a function execution by caching its results. Here, caching helps to avoid the expensive...
View ArticleASP.NET Core Middleware–Part 1
In one of my earlier post, I have discussed in details about the ASP.NET Core request processing and the key components involved i.e reverse proxy, ASP.NET Core Web Server and the ASP.NET Core...
View ArticleControl Expressions in Kotlin
In any imperative programming language, an expression is a line or fragment of code that is computed to produce a value whereas statement is a standalone unit of the program which intends to perform...
View ArticleASP.NET Core Application Startup – Part2
In the last post we found that the Startup class in ASP.NET Core works based on convention. The runtime inspects the class through reflection and invokes the appropriate methods i.e. Configure and...
View ArticleASP.NET Core Application Startup – Part1
In the last post we have discussed on how the ASP.NET Core request processing pipeline works. As a next step, let’s take a closer look into how the ASP.NET Core application gets started and...
View ArticleRequest Processing in ASP.NET Core
ASP.NET Web Forms were launched as part of .NET Framework 1.0 in 2002. It was a logical evolution from ASP, moving away from interpreted web pages with dependency on a scripting engine, towards type...
View ArticleLocal Functions in C#7.0
The nested functions (methods) or local functions are functions defined inside another function , referred to as the enclosing function. The nested functions are available only within the scope of the...
View ArticleDeconstruction in C#7.0
In my earlier blog post related to Tuples, I had used the following two ways for accessing the elements of the tuple. The first one is obviously inefficient and to be honest wrong, there is no point...
View ArticleTuples in C#7
What is a tuple ? - A tuple is an ordered group of elements. Tuple has been there as a data type in most of the functional programming languages like Lisp , Haskell since their inception. For example...
View Article