A
A
Alexey Nikolaev2017-05-01 14:55:42
PHP
Alexey Nikolaev, 2017-05-01 14:55:42

Is it permissible to make factories of factories?

Good day.
I have a set of classes that implement Factory Method. Accordingly, each factory is responsible for its own kind of created objects. However, in the factory client, I need to specify the factory explicitly each time, e.g. new Factory Delta.
Doesn't this make the components of the project more connected? Wouldn't it be better to create a factory for factories, or is that redundant? After all, there may be several potential clients, and each of them will have a strong connection with a specific implementation.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Ineshin, 2017-05-01
@IonDen

If you like it so much, if you yourself understand why this is necessary, if you have not found an easier approach, then please do it. The main thing is that you yourself understand what is happening and why you need to design the application in this way.

G
GavriKos, 2017-05-01
@GavriKos

The tolerance limits are determined by the developer. And no one else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question