Factory Pattern: Decoupling Object Creation
Learn how to use factory pattern to decouple the object creation.
We'll cover the following...
We’ll begin our journey with one of the most common design patterns in Node.js: Factory. As you’ll see, the Factory pattern is very versatile and has more than just one purpose. Its main advantage is its ability to decouple the creation of an object from one particular implementation. This allows us, for example, to create an object whose class is ...