Observer Pattern in JavaScript

In this article we will explore the Observer Pattern in JavaScript. We will look at a real world example that involves processing order shipment and how to implement observer pattern in that context. In object oriented programming the Observer Pattern defines a one-to-many dependency between objects, where one object (the subject or observable) maintains a…

Strategy Pattern in Javascript

Strategy Pattern in JavaScript

The Strategy Pattern is a powerful design pattern in JavaScript that allows you to define a family of algorithms, encapsulate each one as a separate object, and make them interchangeable. This pattern is especially useful when you want to select an algorithm’s implementation at runtime without altering the client code. In this article, we explore how the Strategy Pattern works in JavaScript, providing practical examples to demonstrate its flexibility and scalability in solving various problems.

REST API Delete Resource

REST API Delete Resource

In this article we will look at REST API Delete operation. Compared to Create and Update, Delete operation is fairly easy and straightforward. REST API Delete Implementation Below, we will outline the basic steps of Delete operation implementation. Please, watch our video for more in depth explanation of this concept. Route and Controller In routes/v1/travels…