Book Image

Node.js High Performance

By : Diogo Resende
Book Image

Node.js High Performance

By: Diogo Resende

Overview of this book

Table of Contents (14 chapters)

Types of patterns


Your application won't be using only the core API. In a complex application, you will be using a lot of other modules, some made by you and others that you simply downloaded. Patterns exist everywhere in your application. When you use a module and you need to create a different interface, you would be using the adapter pattern, a structural pattern. If you need to extend the module you just downloaded with a couple of functionality methods, you can use the decorator pattern, another structural pattern. When the downloaded module might need some complex information to initialize, you may want to use the Factory pattern, a creational pattern. If your application evolves and this initialization needs more flexibility, you'll be using the Builder pattern, another creational pattern. If your application accesses relational data, you might have to use the Active Record pattern. If you use some kind of software framework, you might be using the MVC pattern.

Many developers don...