Boost logo

Boost :

Subject: [boost] Proposal for Library to perform dependency injection
From: Adam Young (ayoung_at_[hidden])
Date: 2009-10-26 15:45:22

Having had a career that has bounced me between a few languages, I have had the opportunity to work with a couple of tools in the Java world that didn't see, to have analogues in C++. One of these is the inversion of control containers, of which Spring is one of the best known. Ken Fowler suggested the term "Dependency Injection" as a way to better describe how inversion of control is performed, and I prefer his term.

I've written a fairly simple dependency injection framework in C++ that seems to make proper use of the C++ Language. It is not attempting to do any COM like component model. Rather, it allows the developer the ability to cleanly separate the Object usage from the construction policy.

I've posted the code on Sourceforge at I have not yet taken the time to get it into proper format for a Sandbox project, but will do that next if there seems to be enough interest in the project. I wrote up the philosophy behind the design here:

The code is currently g++ only, although I've attempted to use only core language constructs. It has no dependencies on other libraries other than stl collections.

Any constructive feed back will be most appreciated.


Boost list run by bdawes at, gregod at, cpdaniel at, john at