Design patterns in TypeScript: Chain of Responsibility

In event-driven systems messages produced by one object can be handled by one or more other objects. None of the objects need to know of one another – all they need to share is a common mechanism for distributing messages. Messages are sent from one object to another making them part of a chain. This pattern is called “Chain of Responsibility.” Chain of responsibility in … Continue reading Design patterns in TypeScript: Chain of Responsibility


Singletons in TypeScript

A singleton[1] is a pattern that guarantees there is a single instance of an object in the system. A singleton can maintain a state which is shared across the entire system. Singletons abstract their internal workings from the rest of the system. Singletons are common in business applications. They help model real-life business processes that involve shared resources. Singletons in TypeScript In Node.js – and … Continue reading Singletons in TypeScript