Skip to main content

Timeline for IOC Containers break OOP Principles

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Nov 29, 2014 at 16:35 comment added Jules @Euphoric I don't know about the .net frameworks suamere was talking about, but Spring certainly does do under-the-hood code modification. The most obvious example is its support for method-based injection (whereby it overrides an abstract method in your class to return a dependency it manages). It also makes extensive use of auto-generated proxies in order to wrap your code to provide additional behaviors (e.g. for automatically managing transactions). A lot of this is not actually related to its role as a DI framework, however.
Sep 23, 2014 at 8:38 comment added Den "An IoC container can be used to make following SOLID principles much easier." - can you elaborate please? Explaining how specifically it helps with each principle would be helpful. And of course leveraging something is not same as helping something happen (e.g. DI).
Sep 19, 2014 at 16:30 comment added Euphoric @Suamere I'm not that experienced with IoC, but I never heard of IoC changing compiled code. Would you please provide information about what platforms/languages/frameworks are you talking about.
Sep 19, 2014 at 15:05 comment added Cerad @Suamere - I think you may be using too broad a definition of IOC. The one I use does not modify compiled code. There are plenty of other non-IOC tools which also modify compiled code. Maybe your title should be more like: "Does modifying compiled code break ...".
Sep 19, 2014 at 13:04 comment added Suamere It is my understanding of IOC Containers that in order to manage scope, laziness, and accessibility, it alters the compiled code to do things that break OOP/SOLID, but hides that implementation under a nice framework. But yes, it additionally opens other doors for incorrect use. The best answer to my question would be some clarification on how IOC Containers are implemented that adds or negates from my own research.
Sep 19, 2014 at 1:46 history answered Stephen CC BY-SA 3.0