#design-patterns

2 posts in this collection

Emerging JavaScript pattern: multiple return values

In this article, I want to explore an interesting pattern that I am seeing more and more in JavaScript code which allows you to return multiple values from a function. You probably know already that JavaScript does not support multiple return values natively, so this article will actually explore some ways to “simulate” this behavior. One of the most famous usages of this pattern I have seen recently is within React Hooks , but before delving into that, let’s see what I mean with “multiple return values…

Announcing the book "Node.js design patterns - second edition"

In this post I am going to introduce my last side-project: “Node.js design patterns — second edition”, a technical book about Node.js and design patterns published by Packt. This blog has been a very quite place in the last 8-9 months, this is because almost all my free time has been absorbed by one of my most ambitious side projects: co-writing a book about Node.js and design patterns ! I am finally happy to announce that “Node.js design patterns — second edition” has been published. You can keep…