Inversion of Control in C# World

Inversion of Control becoming very popular pattern and in Java community there are may frameworks that provide IoC implementations. In .NET world situation is worse. In fact, there are almost no production-ready frameworks and most of them in Beta. Ok, let’s check what we have.

Spring.NET is a clone of popular Java based Spring framework. Spring.NET provides various implementations of IoC, but nothing more for now. However, development is going on and in v.0.7 support of AOP and MVC extensions for ASP.NET announced (In fact, developers claim that AOP is already there, but just don’t documented).

Castle is another implementation of IoC in C#. There is very good intoductory article that covers the main ideas of IoC as well (I think the article is really great and much more simpe to get that famous M.Fowlers article). Castle framework provides some more interesting stuff:

  • ActiveRecord pattern implementation integrated with NHibernate.
  • Set of facilities that integrates container with many third-party frameworks (Aspect#, iBatisNet, NHibernate and some other)

Both frameworks are promising and under active development. Documentation is not comprehensive and I don’t think you may completely safely use them for production development heavily, but you may start with IoC in your C# projects slowly (let’s say, in one of the new modules).

One thought on “Inversion of Control in C# World”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s