0 votes
23 views
in Education by (51.6k points)

When Prototype pattern is to be used?

1 Answer

0 votes
by (51.6k points)

When Prototype pattern is to be used?

This pattern is used when creation of object directly is costly. 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.

Related questions

0 votes
1 answer 10 views
0 votes
1 answer 14 views
0 votes
1 answer 13 views
0 votes
1 answer 22 views
0 votes
1 answer 14 views
0 votes
1 answer 64 views
...