Constructor Injection

last modified: November 10, 2014

A particular implementation of DependencyInjection where the InversionOfControl framework injects the dependent objects through the Constructor.


"The basic idea with constructor-injection is that the object has no defaults and instead you have a single constructor where all of the collaborators and values need to be supplied before you can instantiate the object."

http://misko.hevery.com/2009/02/19/constructor-injection-vs-setter-injection/


See InversionOfControl, HollywoodPrinciple, DependencyInjection, SetterInjection


There seems to be some refactoring/consolidation around the collection of terms describing InversionOfControl, but I didn't have the time to undertake it just now). --GeoffSobering

This was spun off from page YaxinWang, which is an odd mixture of public and personal.


Loading...