2.75 out of 5
2.75
53 reviews on Udemy

Writing Clean Asynchronous Code In Node.js

A Complete Guide To Avoiding CallbackHell And Writing Clean Code With Async.js, Async/Await, And Promises
Instructor:
Haider Malik
2,890 students enrolled
English [Auto-generated]
Write Clean Code with Callbacks in Nodejs
Write Clean Code with Promises in NodeJs
Write Clean Code with Async/Await in Nodejs
Avoid CallbackHell with Promises, Asyncjs and Promises
Convert Callbacks To Promises
Best Design Pattern To Write Asynchronous Code in Nodejs

This course will include topics on

  • What is Callback
  • What is CallbackHell
  • How to avoid CallbackHell using Async.js
  • How to avoid CallbackHell using Promises
  • How to avoid CallbackHell using Async/Await
  • What is Promise
  • What is Promise Chaining
  • How to run  Asynchronous tasks in the Series using Promise Chaining
  • How to run  Asynchronous functions in the Parallel using Promise.all
  • How to run Asynchronous functions in Series using Async.series method
  • How to run  Asynchronous methods in Parallel using Async.parallel method
  • How to run  Asynchronous methods  in Loop using Async.each method
  • What is Async/Await
  • Execute Asynchronous tasks in Parallel using Async/Await
  • Execute Asynchronous tasks in Series using Async/Await
  • Run Asynchronous Tasks in Loop using Async/Await
  • Converting Callbacks to Promises
  • What is Bluebird
  • Practical examples of Bluebird.promisify method
  • Practical examples of Bluebird.promisifyAll method

Getting Setup

1
Installing NodeJs
2
Connecting NodeJs Application to MongoLab

In this video, I will teach you how to connect Node.js Application to MongoLab.

Callbacks And CallbackHell

1
What is Callback

You will learn what is Callback in Node.js and how to write your first callback method

2
What is CallbackHell

You will learn what is callbackhell and why callbackhell is a bad way to write code in node.js.

Execute Asynchronous Tasks In Series

1
Introduction to Async.js

Async.js is best third party library to work with callbacks. I'll introduce you some of the best methods of Async.js

2
Execute Tasks In Series Using Async.series

I'll teach you the practical example of Async.series method

3
What is Async.waterfall

If you want to run tasks in series by using callbacks. you must use async.waterfall method

4
Execute Tasks In Series Using Async.waterfall

I'll show you how to apply async.waterfall method to run tasks in series.

5
What is Promise

In this video, you will learn what is a promise in Node.js and how to create a promise in Node.js

6
Execute Tasks in series using Promise Chainning

Promise chaining is the best way to execute tasks in series using promises. you will learn what is promise chaining and how to apply into your application

7
What is Async/Await

One of the best design pattern to write clean code is Async/Await. You will learn what is Async/Await and how Async/Await works with Promises

8
Execute Tasks in Series using Async/Await

In this video, I will show you how to run asynchronous tasks in the series using Async/Await.

Execute Asynchronous In Parallel

1
Introdcution
2
Parallel Demo Setup for Async.js

If you want to run tasks in parallel by using callbacks I will show you how can you do it by using Async.parallel method

3
Create NodeRestClient Service

I'll use node-rest-client package to send the network request. You will learn how to install and integrate this package into the demo application

4
Execute Tasks In Parallel Using Async.parallel

You will learn how to use Async.parallel method.

5
Create Axios Api Service

You will learn how to send the network request by using promise based library axios.

6
Execute Tasks in Parallel Using Promise.all

In this video, I will show you how to run asynchronous tasks in the parallel using Promise.all

7
Execute Tasks In Parallel Using Async/Await

In this video, I will show you how to run asynchronous tasks in the parallel using Async/Await.

Execute Asynchronous Tasks In Loop

1
Introduction
2
Problems With Simple For Loop

In this video, I will talk about the problems to run asynchronous tasks in the loop

3
Execute Tasks In The Loop Using Async.each

If you want to run tasks in the loop by using callbacks. You must use the Async.each method 

4
Execute Tasks In The Loop Using Promises

You can also run tasks in the loop by using Promise.all method.

5
Execute Tasks In The Loop Using Async/Await

One of the best way to run tasks in the loop is Async/Await.

Converting Callbacks to Promises

1
Bluebird.promisify Demo

In this video, you will learn how to convert callbacks to promises by using bluebird library

2
Bluebird.promisifyAll Demo

You will learn how to convert all the callback methods of third party npm module like mongoose. I'll teach you how can you do it by using bluebird.promisifyAll method

Bonus Lecture

1
Learn React and Redux by building real world application
2
FullStackHour
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
2.8
2.8 out of 5
53 Ratings

Detailed Rating

Stars 5
16
Stars 4
11
Stars 3
12
Stars 2
7
Stars 1
7
1e57f35cbd7697f503a0179bf35b273d
30-Day Money-Back Guarantee

Includes

2 hours on-demand video
3 articles
Full lifetime access
Access on mobile and TV
Certificate of Completion