Link Details

Recommendation: This is still a useful pattern for a limited number of scenarios. In particular, the ability to hand out a copy of the instance from a cache means that we don’t have to worry about multi threading.

Posted by egenesky  |   Nov 20 2012 / 08:18

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.


User 771987 avatar

Steve Mcduff replied ago:

Prototypes are useful to create "templates" presented in user interfaces. In your example, the UI might offer a DVD template or a book template populated with convenient default values. When users want to create new DVDs, they copy/paste the template and evolve their new copy. From a code perspective, a call to the clone method makes the copy/paste simple.

Reply 0 votes

Recommended Links

Written by: Ryan Knight
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Play
  3. Akka
  4. Debugging JavaScript
  5. Design Patterns
  1. Apache Hadoop
  2. REST
  3. Java
  4. Git
  5. Java Performance
Connect with DZone