Design Pattern: Visitor Pattern in TypeScript

Visitor pattern allows detailed implementation of methods in concrete classes, and also ensures a common interface for visiting different implementations. This article demonstrates Visitor pattern implementations in TypeScript.

Design Pattern: Template Method Pattern in TypeScript

In Template Method pattern we have some abstract methods(or methods with default implementation), and the actual implementation is done in the subclasses. This is used when there are similar algorithms, but with different steps in implementation. This article demonstrates Template Method pattern implementations in TypeScript.

Design Pattern: Strategy Pattern in TypeScript

Strategy pattern makes it easier to manage algorithms with the same outline(serving the same purpose in different rule/implementation). This pattern encapsulates the algorithms and enables the client to use them as plugins. This article demonstrates Strategy pattern implementations in TypeScript.

Design Pattern: State Pattern in TypeScript

In State pattern implementation, an object behaves differently when on some state change. With the change of state, the behavior can change completely. This article demonstrates State pattern implementations in TypeScript.

Design Pattern: Observer Pattern in TypeScript

Observer pattern decouples the subject from the observer/subscriber. Using this pattern the subject publisher can trigger events on some change, and the listener/subscriber gets informed of the change. This article demonstrates Observer pattern implementations in TypeScript.

Design Pattern: Memento Pattern in TypeScript

Memento pattern maintains a list of state changes performed on an object. This way, we can revert back and can go back to any point of object state history. The internal state is encapsulated inside the object, and the undo process does not need to be aware of it. This article demonstrates Memento pattern implementations in TypeScript.

Design Pattern: Mediator Pattern in TypeScript

Mediator pattern is used to reduce the complexity of communication between objects. As all the communication between objects goes through a mediator/middleman, that’s why the objects are not aware of the underlying complexity. This article demonstrates Mediator pattern implementations in TypeScript.

Design Pattern: Iterator Pattern in TypeScript

Iterator pattern creates an interface for the client to access the internal list items of a collection. The implementation hides the underlying complexity from the client and makes it very simple for the client to traverse a list of items. In this article, we are demonstrating Iterator pattern implementation in TypeScript.

Design Pattern: Interpreter Pattern in TypeScript

Interpreter pattern is used to parse, represent, convert and/or implement some custom language/pattern. We can implement a custom interpreter using this pattern. This article demonstrates Interpreter pattern implementation using TypeScript.

Design Pattern: Command Pattern in TypeScript

Command pattern wraps the full request in an object. This makes the request/command a self-contained element, and can be used/passed at any time without any dependency. This article demonstrates Command pattern implementations in TypeScript.