Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

DEPENDENCY INJECTION

Name: Anonymous 2014-05-24 0:11

What's your opinion on DI? is it just enterprise overengineering shit or it actually makes your code better and testable?

Name: Anonymous 2014-05-24 6:29

>>3
basically you use parameters in constructors/methods such that your class/object/methods do not create their own objects if they need to call methods from those objects; let the client code pass them as dependencies.

>>6
wrap it inside a macro, which will mock the environment.
this is why i actually prefer dynamic binding to lexical binding.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List