The Factory Pattern for Javascript Modules

Share this video with your friends

Send Tweet

Javascript modules are a great way to isolate your code, but they are not very re-usable. If we implement the factory pattern inside of one of our modules we get code re-use without losing the encapsulation benefits of a javascript module.