1 Reply Latest reply on Jul 4, 2011 5:49 PM by jschellSomeoneStoleMyAlias

    When should we use prototype pattern?

      I know object cloning is a concrete usage, but when we should use that?
        • 1. Re: When should we use prototype pattern?
          Since this is a java forum the following from GoF is relevant...

          "Prototype is particularly useful with static languages like C++...and little or no type information is available at run-time...It's less important in languages...that provide what amounts to a a prototype (i.e, a class object) for creating instances of each class."

          Java of course has java.lang.Class and has plenty of type information.

          Cloning is a very special case that is outside normal java.