Talk:Requests for comment/Dependency injection

The DI mechanism is a detail
Inversion of control is very important, and things such as constructor and setter injection can be used to achieve it. Applications then need to be able to construct their object graphs, and can do so in various ways, including by using a Dependency Injection Container (which seems to be what this RFC is about). The only part of the application that should know about the DI container is the part near it's entry points responsible for construction. A common thing that goes wrong in projects when they introduce a DI system is that it gets pulled in from all over the code and talked to directly, since people find that more convenient than actually requiring the depenedencies via constructor injection. (This is not an objection against proceeding - it's definitly good to proceed, one should just be careful about this pitfall.)

-- Jeroen De Dauw (talk) 20:55, 12 August 2014 (UTC)

Good or bad?
I don't get the following statement which seems to contradict itself. --Nikerabbit (talk) 12:31, 15 August 2014 (UTC) "With regard to using RequestContext as a central registry, it seems that that does make sense since RequestContext appears throughout Mediawiki code, so using it would increase coupling, not loosen it."