This project is read-only.

Integrating configuration-and-factory based libraries

There is a lot of existing libraries that are based on pattern of combining XML-based configuration with static factory facades. These factories usually produce instances of classes implementing well-known interface which client programmers use to interact with it.
A canonical example of this approach is Enterprise Library up to version 4.0. Because the way Enterprise Library was designed was an official guidance of Patterns & Practices group for library architects, many other libraries were implemented the same way.
Our goal in integrating those existing libraries into dependency injection infrastructure is to enable the container to resolve dependencies on library abstractions. To achive it, we have to register in the container the mappings of these abstractions to the methods which can create their implementations. These methods, of course, can be based on existing factory functionality built into the library. The MetaContainer let us do this. All one have to do is to invoke the piece of code which perform configuration scan and registers all the necessary mappings.

Last edited Mar 7, 2009 at 6:31 PM by Leszcz, version 2

Comments

No comments yet.