Search code examples
c#.netasp.netioc-containerwcsf

IoC comparisions


Which IoC to consider while developing ASP.NET Web application project and what are the advantages of different IoC?

  1. ObjectBuilder
  2. Unity
  3. Spring.NET

Solution

  • It is not in your list but consider looking at Castle Windsor

    Number of facilities such as supporting Factories so that the factory product is injected not the factory itself or the Wcf facility for injecting a proxy or creating a host with dependencies.

    Has a nice fluent interface for wiring up individual items but preferably you would use a convention to auto wire up so that you don't have to list each component.

    Some other nice features:

    • Requires a single dll since new revision.
    • Supports injecting lists and arrays via SubDependancy resolvers

    Here is a poll taken this year showing the favoured IoC. Unity seems to be top but that is probably because it is a Microsoft product and Microsoft workshops will pick it up by default.