What is the Prototype Pattern?
Creating complex objects from scratch can be expensive when initialization involves heavy computation, database calls, or deep object graphs. When you need multiple instances with similar configurations, reconstructing each one is wasteful. The Prototype pattern addresses this by allowing you to copy existing instances.
Think of photocopying a document. Instead of rewriting the entire document by hand each time you need a copy, you use a copier that creates duplicates. The original document is the prototype, and each copy is a clone.
First, when creating an object is expensive (database queries, file loading, complex calculations). Second, when you need many objects that differ only slightly from each other. Third, when you want to avoid subclass explosion just for different initial states. However, if object creation is cheap and configuration is simple, direct instantiation with a factory is clearer.