Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

16
  • 1
    What bad practices do they encourage? As for private classes, you shouldn't need to have very many of them if you have good encapsulation; for one thing, they're much harder to test. Commented Sep 1, 2012 at 23:09
  • Err, 1 and 2 are the bad practices. Large constructors and not using encapsulation to establish a minimal interface? Also, I said private and internal (use internals visible to, to test). I have never used a framework that forces me to use a particular IoC container. Commented Sep 1, 2012 at 23:16
  • 2
    Is it possible that perhaps a sign of needing many parameters for your class constructors is itself the code smell and the DIP is just making this more obvious? Commented Sep 1, 2012 at 23:23
  • 3
    Using a specific IoC container in a framework generally isn't good practice. Using dependency injection is a good practice. Are you aware of the difference? Commented Sep 2, 2012 at 0:12
  • 1
    @Aaronaught (back from the dead). Using, "dependency injection is a good practice" is false. Dependency Injection is a tool that should be used only when appropriate. Using Dependency Injection all the time is a bad practice. Commented Oct 15, 2013 at 12:31