lundi 9 mars 2015

Dealing with dependencies

Is it considered a good practice to pass needed dependencies to method that requires them instead of passing those all dependencies to object constructor? Lets say I have a object that needs to be drawn. Is it considered a good idea to pass renderer to that object's draw() method or I should pass renderer to that object's constructor in the first place?


Aucun commentaire:

Enregistrer un commentaire