1

Here's the current layout:

Solution:

  • Core

    • Domain
    • Interfaces
  • DataAccess

    • Providers
    • Session
  • Service

  • UI

  • UnitTests

  • IntegrationTests

I typically try to keep my core domain entities / POCOs as light as possible without very many external dependencies.. So I was thinking it might make sense to put it in the Service layer as it typically has a project reference to all of the layers.

I have noticed that in CodeCampServer they have actually created a separate project called DependencyResolution for their IoC configuration:

http://code.google.com/p/codecampserver/source/browse/trunk#trunk/src/DependencyResolution

Thoughts?

David P
  • 3,604
  • 3
  • 37
  • 54
  • Take a look at http://stackoverflow.com/questions/536994/not-understanding-where-to-create-ioc-containers-in-system-architecture – xrost May 10 '09 at 04:27

1 Answers1

1

IOC configuration should be off to the side. It doesn't necessarily need to be in a separate project, but it needs to be away from the application code. We put it in another project in CodeCampServer to make 'off to the side' more real. But in a current production app, we keep it in a separate namespace in our main project. We consolidated projects to increase compile time.

Matt Hinze
  • 13,577
  • 3
  • 35
  • 40
  • I ran into circular reference problems when i put my Bootstrapper in a separate project. If my test projects and Web project reference the IoC project then it barfs! What's the solution here? For the moment i have IoC Init in the host web project and also it is Init'ed for the test projects too. – Matt Kocaj May 23 '09 at 10:36
  • that's part of the point: don't reference your ioc project in your web project. check out codecampserver. your ioc project shouldn't need a reference to your test project. – Matt Hinze May 23 '09 at 13:56