title: Design - Where should objects be registered when using Windsor
body: <p>I will have the following components in my application</p>
  
  <ul>
  <li>DataAccess</li>
  <li>DataAccess.Test</li>
  <li>Business</li>
  <li>Business.Test</li>
  <li>Application</li>
  </ul>
  
  <p>I was hoping to use Castle Windsor as IoC to glue the layers together but I am bit uncertain about the design of the gluing.</p>
  
  <p>My question is who should be responsible for registering the objects into Windsor?
  I have a couple of ideas;</p>
  
  <ol>
  <li>Each layer can register its own objects. To test the BL, the test bench could register mock classes for the DAL.</li>
  <li>Each layer can register the object of its dependencies, e.g. the business layer registers the components of the data access layer. To test the BL, the test bench would have to unload the "real" DAL object and register the mock objects.</li>
  <li>The application (or test app) registers all objects of the dependencies.</li>
  </ol>
  
  <p>I am seeking some ideas and pros/cons with the different paths.</p>