Contents tagged with dependency injection

  • El Cheapo Service Container

    A few days ago a collegaue of mine blogged about performing DI on the cheap. His post got me to thinking about the various IoC containers and DI frameworks that have sprung up (no pun intended, sorry for that heinous attempt at geek humor). As I've been working through the Social Timeline architecture I've concluded the importance that'll reside on being able to snap in time line data providers with ease. Inspired by Bo's post, I've named the project El Cheapo. Though it doesn't make use of any of the popular IoC/DI frameworks out there it does borrow some of the general ideas from their implementations. I was specifically inspired by Nikola Malovic's discussion of Unity, namely the way interfaces are resolved to types. 

  • Dependency Injection Example - Constructor Injection and Service Orientation

    With all the talk on weblogs or technical conversations within my own organization about DI it's difficult to ignore it as little more than the latest "new black" pattern. I've given it some considerable thought and until quite recently didn't really comprehend the overall niftiness of the DI approach. As with anything else it took a moment of "a-HA" to really grasp the power of DI; I was developing a custom CruiseControl.Net build plugin and realized that the plugins are injected dynamically at construction time. If you debug  one of these plugins, you'll notice that the plugin constructors don't match a common parameter structure. The one commonality throughout all the plugins I was investigating as examples for my own education seemed to be in the parameter types - they were all interfaces, implementations of which were usually stored in the CCNet server application domain.