Hi all,

did a bit of a google around first before asking but was just wanting
opinions on some best practices for Windsor installers. This all started as
recently I was informed that a library providing it's own installer was a
bad practice and the calling client (e.g. an asp.net website) should
provide it's own configuration. On the surface it sounded reasonable but
since then I've started having misgivings about this approach.

*Library providing installer*
Pros : Should know how to make decisions about what components are injected
where or how. i.e. it has intimate knowledge about the library.
Cons : Clients can't alter the lifetime that the library is specifying.
Though I've seen developers get around this by passing the lifetime into
the constructor (e.g. perthread vs perwebrequest).

*Client providing installer*
Pros : It means that a client knows what it is configuring.
Cons : It means that a client has to have intimate knowledge about what is
happening inside a library. If the library is sourced over nuget for
example this would be really hard to do.

I'm sure there are lots more but ... How do developers normally see this
done?

Thanks in advance!
Dave Walker

Reply via email to