スキップしてメイン コンテンツに移動

投稿

9月, 2009の投稿を表示しています

C++ Dependency Injection (or the next best thing) on Windows

Dependency Injection (DI) is one of the recent buzz phrases within the design pattern community after Martin Fowler picked it up with another related concept Inversion of Control (IoC) in 2004. Since then, it became popular in Java lightweight frameworks where adding late binding was seen as a critical step for upping productivity. The core value of DI is basically represented in these 2 points: Testability. DI makes testing easy by enabling loosely coupled components that are easily replaced with mock objects. Dependency control. When you deploy a DI framework instead of using the Factory Method pattern, dependency can be managed outside of components. The first point is rather obvious. To understand the second point, I recommend you to browse the Google Giuce lightweight Java DI framework for its video presentation and documents. It illustrates the necessity of such a framework for Java in a straightforward way. Particularly, Giuce appears to be a neat implementation of DI where y...