Would this be considered dependency injection, or delegation or object collaboration?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
closed as off topic by Michael K, gnat, Robert Harvey, ChrisF♦ Aug 22 '12 at 23:12
Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
The ors in your question make it sound like those three things are mutually exclusive.
This is a form of dependency injection, albeit a non-conventional form of it. In the end, you are injecting Logger_model into User_model, so it is injection of a dependency. It is also true to say that Logger_model is a collaborator in this instance. And it is also true that User_model delegates logging to Logging_model.
So, basically, it's all of the above.