V
V
vyn2021-01-02 13:44:21
Spring
vyn, 2021-01-02 13:44:21

Why doesn't Dependecy Injection break the GRASP Creator pattern?

Question in heading, actually a subject.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2021-01-02
@Maksclub

Because it doesn't violate... A factory/aggregate creates the required instance if its responsibility in this
DI is about dependencies, that is, we create and pass dependencies outside, not inside... The Creator does not create its own dependency, but simply some output object... itself does not work with this object

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question