Node Patterns: From Callbacks To Observer
by Azat Mardan /
2017 / English / PDF, EPUB
362.6 KB Download
Node.js is a performant platform for web apps which is built on JavaScript—the most popular programming language in the world. If you aspire one day to become a Node.js architect (or maybe you’re already one and want to extend your knowledge), this presentation is for you, because we’ll talk about main Node patterns. In this book, we will start with the basic: what is event loop and callback (setTimeout(), setImmediate() and process.nextTick()). Then we'll discuss the observer pattern with EventEmitter, the Middleware pattern and the Module patterns. Next you will learn how to hack object prototype and global refs. We will also discuss factory pattern and pseudo-classical inheritance. And lastly, we'll tackle Async patterns: Async, NeoAsync, async await, generators and Promises.