Информация об изменениях

Сообщение Re[16]: DI от 19.12.2019 20:25

Изменено 19.12.2019 20:26 Артём

Re[16]: DI
Здравствуйте, Kernan, Вы писали:

K>Здравствуйте, $$, Вы писали:


K>$>https://google.github.io/guice/api-docs/3.0/javadoc/com/google/inject/Injector.html

K>Т.е. это сервис локатор? Мне тут говорят что сервис локатор ещё хуже синглтона и что все параметры надо передавать в конструктор. Как это для С++ будет выглядит?

The injector tracks the dependencies for each type and uses bindings to inject them. This is the core of Guice, although you rarely interact with it directly. This "behind-the-scenes" operation is what distinguishes dependency injection from its cousin, the service locator pattern.

Re[16]: DI
Здравствуйте, Kernan, Вы писали:

K>$>https://google.github.io/guice/api-docs/3.0/javadoc/com/google/inject/Injector.html

K>Т.е. это сервис локатор? Мне тут говорят что сервис локатор ещё хуже синглтона и что все параметры надо передавать в конструктор. Как это для С++ будет выглядит?

А почитать по указанной ссылке совсем никак?

The injector tracks the dependencies for each type and uses bindings to inject them. This is the core of Guice, although you rarely interact with it directly. This "behind-the-scenes" operation is what distinguishes dependency injection from its cousin, the service locator pattern.