1

I am involved with several open source projects which taken together provide an application development framework. The question I have is what mechanism(s) should I provide for integrating them with each other?

On the conceptual level the answer is clear - DI/IoC. The "only" problem is to decide which one. In several installations we used StructureMap, but then a user came along who wanted only one of the components and wanted NInject.

So, to qualify the question, how should I go about building my components so that they can be integrated with each other (and 3rd Party) using a variety of DI/IoC containers.

The best I could come up with was to separate out all integration code into separate projects and then have a project per supported IoC container, but this sounds suspiciously like IoC squared.

Any bright ideas? or I am just thinking too hard?

P.S. for the curious: NDjango; Bistro; Workflow Server

mfeingold
  • 7,094
  • 4
  • 37
  • 43

2 Answers2

2

As long as you develop reusable components, you can implement them in a DI-friendly way without ever referencing any particular DI Container.

It' only when you need to compose an actual, running application that you need the DI Container, but as I understand, you are developing a framework, and it's best to keep it DI-neutral.

Community
  • 1
  • 1
Mark Seemann
  • 225,310
  • 48
  • 427
  • 736
2

See this very related question (almost a duplicate).

For inspiration about integrating several projects while keeping them independent, see the Castle Project.

Community
  • 1
  • 1
Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275