You Used To Inject Me In Your Constructor
-
Upload
veronica-lillie -
Category
Engineering
-
view
334 -
download
3
Transcript of You Used To Inject Me In Your Constructor
–Dependency Injection Demystified
“Dependency injection means giving an object its
instance variables. Really.
That's it.”
–HaskellWiki
“…expressions are not evaluated when they are
bound to variables, but their evaluation is deferred until their results are needed by
other computations. ”
–HaskellWiki
“This makes it possible to defer the computation of
values until they are needed, that is, to compute
them lazily. ”
–Python 3 Tutorial
“ If the same input or a function call with the same
parameters is used, the previously stored results can
be used again and unnecessary calculation are
avoided.”
–In today’s post-OO world, is dependency injection still relevant?
“Currently we use the same mechanism – parameters – to define the environment
(e.g. via constructor parameters), as we use to
pass data around functions.”
–Don’t Fear The Reader
“…if you break down common dependency
injection libraries they are just different
implementations of the Reader Monad pattern.”