Anything more extensive or complex than a few thousand lines of code becomes excruciatingly slow to compile by the TypeScript compiler. A large project worked upon by a large development team will soon discover that the TypeScript compiler itself is a massive productivity bottleneck.
A Factory hides the details of instantiating objects within a class hierarchy. The client provides some information regarding the object it needs. Based on that information the factory determines which class of objects to instantiate and how to go about it. Factories are typically Singletons but don’t necessarily need to be, and it depends on … Continue reading Design patterns in TypeScript: Factory
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 … Continue reading Design patterns in TypeScript: Chain of Responsibility
A singleton 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 … Continue reading Singletons in TypeScript