Writing Clean Asynchronous Code In Node.js
2.6 (59 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,903 students enrolled

Writing Clean Asynchronous Code In Node.js

A Complete Guide To Avoiding CallbackHell And Writing Clean Code With Async.js, Async/Await, And Promises
2.6 (59 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,903 students enrolled
Created by Haider Malik
Last updated 8/2018
English
English [Auto]
Current price: $125.99 Original price: $179.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • 3 articles
  • 25 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • 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
Course content
Expand all 28 lectures 02:03:59
+ Getting Setup
2 lectures 03:29
Installing NodeJs
00:02

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

Preview 03:27
+ Callbacks And CallbackHell
2 lectures 06:58

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

What is Callback
03:59

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

What is CallbackHell
02:59
+ Execute Asynchronous Tasks In Series
8 lectures 48:49

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

Introduction to Async.js
00:55

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

Execute Tasks In Series Using Async.series
13:22

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

What is Async.waterfall
02:52

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

Execute Tasks In Series Using Async.waterfall
09:47

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

What is Promise
05:11

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

Execute Tasks in series using Promise Chainning
08:14

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

What is Async/Await
03:23

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

Preview 05:05
+ Execute Asynchronous In Parallel
7 lectures 33:32

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

Parallel Demo Setup for Async.js
02:25

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

Create NodeRestClient Service
05:59

You will learn how to use Async.parallel method.

Execute Tasks In Parallel Using Async.parallel
06:32

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

Create Axios Api Service
03:40

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

Execute Tasks in Parallel Using Promise.all
08:05

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

Execute Tasks In Parallel Using Async/Await
05:44
+ Execute Asynchronous Tasks In Loop
5 lectures 24:06

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

Problems With Simple For Loop
06:00

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

Execute Tasks In The Loop Using Async.each
05:46

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

Execute Tasks In The Loop Using Promises
06:05

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

Execute Tasks In The Loop Using Async/Await
05:18
+ Converting Callbacks to Promises
2 lectures 06:53

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

Bluebird.promisify Demo
03:59

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

Bluebird.promisifyAll Demo
02:54
+ Bonus Lecture
2 lectures 00:11
Learn React and Redux by building real world application
00:00
FullStackHour
00:11
Requirements
  • Basic Knowledge of Javascript is Important
  • Basic Knowledge of Nodejs is Important
  • Basic Knowledge of Expressjs is Important
Description

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
Who this course is for:
  • Programmers looking to learn, how to avoid callbackhell
  • Developers who want to write Clean Code Asynchronous Code in Nodejs
  • Developers who want to learn Async/Await in Nodejs
  • Developers who want to learn Promises in Nodejs
  • This course is not for Nodejs beginners,you must have an intermediate knowledge of Nodejs
  • Developers who want to follow the best practices to write code using Callbacks
  • Developers who want to learn how to run tasks in parallel,series and in the loop using Callbacks
  • Developers who want to learn how to run tasks in parallel,series and in the loop using Promises
  • Developers who want to learn how to run tasks in parallel,series and in the loop using Async/Await