What do you think where we can use Prototype design pattern?
Can you explain about Prototype design pattern example and where we can use it.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Saineshwar BageriPosted Apr 25, 2015, 10:20 AM
Prototype pattern is used to create a duplicate object or clone of the current object to enhance performance. This pattern is used when creation of object is costly or complex.
For Example: An object is to be created after a costly database operation. We can cache the object, returns its clone on next request and update the database as and when needed thus reducing database calls.
Mark as answer if you got it.