All five creational patterns from the problem they solve. Singleton's failure modes (naive, DCL bug, eager init) and the enum solution. Factory Method vs Abstract Factory. Builder for telescoping constructors. Prototype's deep vs shallow copy trap. Object Pool for expensive resources.
// Lessons
- 01soon
Why Creational Patterns? — The Problem of Object Construction
- 02soon
Singleton — All the Ways to Do It Wrong
- 03soon
Singleton — The Enum Solution (Serialisation-Safe, Reflection-Safe)
- 04soon
Factory Method — Decoupling Creation from Usage
- 05soon
Abstract Factory — Families of Related Objects
- 06soon
Builder — Telescoping Constructors and Fluent APIs
- 07soon
Prototype — Clone vs Copy Constructor and Deep Copy
- 08soon
Object Pool — Reusing Expensive Objects