In object-oriented design, dependency injection is a well-known design pattern, although it's a complicated solution to the problem of decoupling. Functional programming offers a simpler way.
This talk examines dependency injection in object-oriented design, and explains how it's not required (nor desired) in functional programming. You'll also learn how a proper functional design eliminates the need for mocks and stubs in unit testing, enabling you to entirely reject the notion of dependencies.
You don't need to know Haskell or F# to attend this session; relevant syntax will be explained just-in-time. Object-oriented examples will be in C#.
DDD is often invoked to justify perfectionism, or sometimes it sets up in people's minds an intimidating, impossible standard. This leads to endless analysis and polishing or indecisive thrashing. Although DDD does value polish and refinement in certain aspects of the software, the thrust of it is experimental and messy -- and always pragmatic.
For example, bounded contexts are an explicit acknowledgement of the need to confine our intensive modelling within a modest scope. And within that modest scope, we iterate toward refinement, sometimes having insights along the way that lead to much deeper, more elegant models ... but only sometimes, and unpredictably. Good designs always have flaws. And losing a pragmatic, balanced view of all this makes projects slow! Paradoxically, moving slowly means less exploration, less iteration and therefore worse design.
This has happened to most serious designers. It has happened to me. This balance doesn't usually happen without conscious attention, and it helps to have some concrete techniques for making well-designed, imperfect software. We can also shift our mindset to produce better designs by avoiding the pitfalls of idealism.