Can we teach Node Js without callbacks?
After another semester teaching Web Development, the following question arises to my mind: can we teach Node Js without callbacks? Considering that we cannot avoid Promises and async/await, should we continually introduce callbacks in the first place? Notice that:
- Most Node APIs already supports Promises, e.g. file system module
- It is increasingly difficult to find an HTTP client Node module that provides
callback-based API. For instance, one of those most used modules, i.e.
request(with 23M downloads/week) announced that is fully deprecated in February of 2020.
Of course, we can always use the standard
http module of Node, yet its API is
far from being friendly.
Thus, this leads me to think that we could remove callbacks from the curricular plan of the Web Development course. Can we?
So, now regarding these latter points I will tend to consider that we should also keep callbacks-based calling convention in the curricular plan of Web Development course. Or not?