views:

28

answers:

1

After reading the documentation (http://stw.castleproject.org/Windsor.Installers.ashx) I've found a strange part:

Although technically it's OK to call Install multiple times, or register components outside of installers it is considered good practice to encapsulate all registration in installers, and to install all installers during a single call to Install. It is quite possible that in future versions Windsor will be optimized for such usage.

Okay, good practice, agree. This is okay when I'm able to load all my assemblies at startup, but what to do when not?

Let's say my shell starts, user logs in, assemblies coming based on roles, assemblies coming based on actions etc. Normal situation in an mid-sized enterprise application.

Any idea, comment, note? I'm especially interessed in performance trade-offs.

+3  A: 

If you cannot install all components at once, you just can't. It's just a recommendation.

The reason it's recommended is because installing all components at once will give a consistent experience to your application. If you add them later, a component that would not resolve at one moment, would later on, or would resolve differently.

If you take care handling such cases (i.e. you know what you're doing), you should be safe.

Pieter