views:

199

answers:

2

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?

A: 

Take a look at this post

+1  A: 

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
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.
cottsak
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