Home

Castle Stronghold

Table of contents

  • 1 Castle MicroKernel
    • 1.1 Dependencies
  • 2 Castle Windsor Container
    • 2.1 Dependencies

Choosing the right one: MicroKernel or Windsor

For newcomers, the differences on MicroKernel and Windsor might not be so clear. This document attempts to explain which one you should choose based on the your usage purpose.

Castle MicroKernel

The MicroKernel is the core of the inversion of control container offered by the Castle Project. It is simple and lightweight and has no missing functionality. However it does not come with support for external configuration. It also does not implement the interface IProxyFactory.

This was intentional to allow the MicroKernel to have fewer dependencies. It was also a good strategy to not put all those concerns (configuration, proxying) on the same project. So it was Separation of Concerns applied.

You should pick up the MicroKernel if you do not plan to have external configuration (or you plan to have your own code that handles external configuration) and if you do not need proxies (ie does not uses interceptor).

Usually tools and products can take advantage of the MicroKernel as a way to implement a more sophisticated plug-in infrastructure.

Dependencies

Castle.MicroKernel depends on

Castle Windsor Container

The Windsor Container is not another container. Instead it just aggregates the MicroKernel and makes use of the extension points offered by it to expose a powerful external configuration support and an IProxyFactory implementation that uses Castle DynamicProxy. Windsor also exposes a simpler interface than the MicroKernel.

This way it is undoubtedly the best choice for common enterprise application which often needs external configuration and interceptor support to perform non-intrusive logging, transaction management and auditing.

As everything comes with a price, Windsor has more dependencies than the MicroKernel.

Dependencies

Castle.Windsor depends on

Google
Search WWW Search castleproject.org