Design patterns in Node.js: a practical guide

Click for: original source

Fernando Doglio, Technical Manager @Globant, wrote this piece about design patterns in Node.js. Design patterns are part of the day to day of any software developer, whether they realize it or not.

In this article, he will look at how to identify these patterns out in the wild and look at how you can start using them in your own projects.

Design patterns, simply put, are a way for you to structure your solution’s code in a way that allows you to gain some kind of benefit. Such as faster development speed, code reusability, and so on.

Sections available in the article:

  • What are design patterns?
  • Immediately Invoked Function Expressions (IIFE)
  • Factory method pattern
  • Singleton pattern
  • Observer pattern
  • Chain of responsibility

Code examples and links to further reading also included. Hopefully, this article will shed some light on this subject and helps you improve your coding-foo faster than ever. Nice one!

[Read More]

Tags nodejs javascript software-architecture code-refactoring