Prototype Pattern

What is the Prototype Pattern? The Prototype Pattern is a creational design pattern. It enables the creation of new objects by copying an existing object, rather than creating them from scratch via their class constructors. This helps decouple code from specific classes. Prototype: Common vs Software Usage When I first encountered the Prototype Pattern, I was confused. The word “prototype” in daily use has a slightly different meaning, so let’s clarify that first. ...

October 11, 2020

Singletone Pattern

References: Refactoring Guru - Singleton Pattern Wikipedia - Singleton Pattern jeong-pro 블로그 What is the Singleton Pattern? The Singleton Pattern is a creational design pattern that ensures a class has only one instance and provides a global point of access to it. When is it used? It’s useful in situations where exactly one object is needed to coordinate actions across the system—like: Database connection A shared configuration object A centralized logging service These are cases where a single, globally accessible instance makes sense. ...

October 11, 2020