Where in your solution do you usually put the StructureMap Registry classes?
Here's the current layout:
Decision:
-
Core
- Domain
- Interfaces
-
DataAccess
- Providers
- Session
-
Service
-
interface
-
UnitTests
-
IntegrationTests
I usually try to keep my main domain / POCOs as lightweight as possible, without very many external dependencies. So I thought it made sense to place it in the service layer as it usually has a project reference for all layers.
I noticed that in CodeCampServer they 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 source to share
The IOC configuration should be sidelined. It doesn't have to be in a separate project, but it should be far away from the application code. We added it to another project in CodeCampServer to make it a bit more real "aside". But in the current production application, we keep it in a separate namespace in our main project. We have consolidated projects to increase compile times.
a source to share