1

Topic: For what pattern Prototype?

Prompt, please, in what sense of a pattern the Prototype? Than the Abstract factory concedes to it? I do not drive...

2

Re: For what pattern Prototype?

Hello, Maxim Rogozhin, you wrote: > Prompt, please, in what sense of a pattern the Prototype? Than the Abstract factory concedes to it? I do not drive... It is possible to specify once parameters and to request objects necessarily. For example in windows forms so  has been arranged - its lines formed on a prototype.

3

Re: For what pattern Prototype?

Hello, Maxim Rogozhin, you wrote: > Prompt, please, in what sense of a pattern the Prototype? Than the Abstract factory concedes to it? I do not drive... Well at factory still it is necessary to make object, it can be nontrivial or it is unprofitable. And the prototype can be copied simply, receiving an end-product, without reflecting especially as did a prototype.

4

Re: For what pattern Prototype?

Hello, Maxim Rogozhin, you wrote: > Prompt, please, in what sense of a pattern the Prototype? Than the Abstract factory concedes to it? I do not drive... The Factory and the Factory method are engaged in that create new object (family of objects) which specific type is unknown (is known the interface). The prototype creates new specific object and initializes it on the basis of the standard. Certainly and the prototype can return and accept the interface, instead of a class, but it all the same will return the type copy which copy has been transferred in it. Basically, they can be combined, for example, when the Factory will return new object on the basis of the standard. But, it will be two templates, working jointly.

5

Re: For what pattern Prototype?

Hello, bnk, you wrote: bnk> Well at factory still it is necessary to make object, it can be nontrivial or it is unprofitable. And, well i.e. the key moment it that object manufacture happens nontrivial or unprofitable. In this case also it is necessary to apply a pattern the Prototype, so?

6

Re: For what pattern Prototype?

Hello, Maxim Rogozhin, you wrote: > Hello, bnk, you wrote: bnk>> Well at factory still it is necessary to make object, it can be nontrivial or it is unprofitable. > and, well i.e. the key moment it that object manufacture happens nontrivial or unprofitable. > In this case also it is necessary to apply a pattern the Prototype, so? As it was considered in other Author: mizuchi Date: 05.03 05:25, it "is not necessary", and it "is possible"

7

Re: For what pattern Prototype?

Hello, Maxim Rogozhin, you wrote: > And, well i.e. the key moment it that object manufacture happens nontrivial or unprofitable. In this case also it is necessary to apply a pattern the Prototype, so? Actually, one of variants - yes if manufacture from zero happens  and easier to take a copy... Other variant when it is necessary to make a copy... But, as more than once specified - it is not necessary, and it is possible

8

Re: For what pattern Prototype?

Hello, Nikolay_Ch, you wrote: N_C> Other variant when it is necessary to make a copy... But if it is necessary to make a copy why simply not to use the designer of copying (a C ++)//so: A objectCopy = objectOriginal;//or so: A* objectCopy = new A (*objectOriginal);

9

Re: For what pattern Prototype?

Hello, Maxim Rogozhin, you wrote: > But if it is necessary to make a copy, why simply not to use the designer of copying (C ++) I Will open you "secret", pattern "Prototype" it and does in the most simple case... The Question only that the copying code is hidden in a pattern. Actually, patterns for this purpose also are necessary to incapsulate in themselves the information on that, "AS it is necessary to DO" and "With WHAT TYPES".

10

Re: For what pattern Prototype?

Hello, Maxim Rogozhin, you wrote: > But if it is necessary to make a copy, why simply not to use the designer of copying (++) You tell a C already about implementation. Patterns it are faster about the theory (about that how to name). Certainly, "prototype" can be implemented and the designer of copying. That is, the code more low, basically, it is possible to name implementation of a pattern "prototype". A* objectCopy = new A (*objectOriginal);