Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In tutorials and books, I have never seen a single word describing the object that the injected object is injected into. Instead, other terms are used, like "injection point" which don't denote the object containing the injected object. And nothing I can think of sounds right, except maybe "injection target" - but I have never read it anywhere.

Is there a single word or a simple expression for it, or is it like the "He-Who-Must-Not-Be-Named" from a recent fantasy book series?

share|improve this question
1  
The Wikipedia article calls it a Dependent Consumer. – Robert Harvey Oct 10 '12 at 19:24
@RobertHarvey - I guess I'll be going with the wikipedia proposal - it also sounds right since there are producers which are exactly the counterpart of such a consumer. Care to repost as an answer? – kostja Oct 10 '12 at 19:32
On an unrelated note, Harry Potter is recent? It started when I was a kid... – Camilo Martin Apr 18 at 13:21
@CamiloMartin It did start a while ago, but the last movie came out in 2011 which was recent in 2012 – kostja Apr 19 at 5:50
@kostja Well, that's true. Further de-railing the comments section, I can't believe Fifty Shades of Grey sold more copies. – Camilo Martin Apr 19 at 8:18

3 Answers

up vote 5 down vote accepted

Wikipedia calls it the "Dependent Consumer," or simply the "Dependent Object."

share|improve this answer

There is no formal name - I usually think about it as the object that needs the dependency.

Call it the dependant object...

share|improve this answer
It's supposed to be one word. How about DependentObject? :-) – Karl Bielefeldt Oct 10 '12 at 19:33

Container sounds like a perfectly acceptable term to me. EG IThing is injected in to its container

Edit -- Comments rightly say that container is already in use in this situation. How about dependee eg The dependency is injected in to its dependee?

share|improve this answer
2  
That would be a good name, but unfortunately, 'container' is already taken - by the facility that is responsible for managing the objects and injecting them into each other. – kostja Oct 10 '12 at 19:19
1  
Bugger. That would explain why that term jumped to mind immediately and seemed to fitting then! – AndyBursh Oct 10 '12 at 19:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.