Note |
---|
|
As of July 25th, 2023, there is a content freeze on this page. |
Traditional JavaScript and Node.js API will utilize the concept of asynchronous callbacks for virtually every input/output operation. It is a common pattern for Node.js API. Whether it's reading a disk file, accessing a database table, or calling a web service, the results are not directly returned to the caller; instead, they are passed into a separate function referred to as a callback.
Because of JavaScript's design, the default way to "freeze" a computation and have the "rest of it" execute later (asynchronously) is to put "the rest of it" inside of a callback function.
For certain types of applications, this can be quite useful and performant; however, it also creates the problem more commonly known as Callback Hell. A lot of code ends up looking like this:
...
Video Tutorial
Section |
---|
Column |
---|
| Widget Connector |
---|
width | 320 |
---|
url | https://www.youtube.com/watch?v=datt2wCiROI |
---|
height | 180 |
---|
|
Widget Connector |
---|
width | 320 |
---|
url | https://www.youtube.com/watch?v=BqoLkuQ6zvQ |
---|
height | 180 |
---|
|
|
Column |
---|
| Widget Connector |
---|
width | 320 |
---|
url | https://www.youtube.com/watch?v=swW0EAXVrlQ |
---|
height | 180 |
---|
|
|
|