Oracle Magazine, July/August 2017
Database Developer OPEN SOURCE ORACLE MAGAZINE JULY AUGUST 2017 58 node named functions js 1 three seconds after the start 2 two seconds after doWork1 3 one second after doWork2 Although theyre effective at limiting the level of indentation named functions alone can help you only so much with respect to asynchronous programming For example this technique can be used only for sequential processing For more complex flows such as those involving parallel processing youll need some better tools In the articles that follow I will explore more robust solutions for handling asynchronous flows in Node js including the Async module promises and a new feature of JavaScript that builds on promises and greatly simplifies asynchronous code async await Ill explore each of these solutions in the context of a database query Dan McGhan is the Oracle developer advocate for JavaScript and HTML5 He enjoys sharing the passion hes developed for JavaScript and HTML5 with others NEXT STEPS LEARN more about JavaScript and Oracle
You must have JavaScript enabled to view digital editions.