Design Pattern: Adapter Pattern in TypeScript

Adapter pattern is used to create a bridge between two incompatible interfaces. Due to some change in the system, or new implementation if we need to enable any existing interface to use the new interface. In that case Adapter pattern can help. This article is about Adapter pattern implementations in TypeScript.

Design Pattern: Adapter Pattern in Go

Adapter pattern helps by enabling an interface to adapt to a new interface. This is useful when we have an existing interface, and some new requirement comes or we need to adapt to some interface that is developed separately. By following the Open/Closed principle, the adapter pattern keeps the existing interface as is, ads the adapter implementation as a bridge to then new interface. This article demonstrates Adapter pattern implementations in Go.

Design Pattern: Prototype Pattern in Go

Prototype pattern clones an existing object to create a new object, instead of building a new object at runtime. This helps reduce resource usage, as the complex object creation/initiation process is replaced with cloning existing objects. This is very useful for keeping object cached and/or default object. This article demonstrates Prototype pattern implementations in Go.