The notion of Dependency Injection or Inversion of Control has generated quite a bit of interest lately. To a large extend, the move towards this architectural style is driven by developer's dissatisfaction with strong dependencies of individual components on their run-time container (for example, J2EE). These dependencies make it difficult or impossible to test components outside of their container, throwing a major monkey wrench into test-driven development of these types of applications. Dependency Injection avoids these dependencies and therefore improves testability. On a recent project we developed an event-driven architecture (intra-JVM, not distributed) and found that we could realize many of the same benefits.
↧