Feeds:
Posts
Comments

Archive for May, 2010

Before jumping into the Munq, Let’s understand IOC first:
Inversion of Control (IOC) is a pattern which decouples the use of an interface from the concrete implementation of that interface. By eliminating this coupling:
* The code can be tested by using special test implementations of the interface.
* Fewer DLLs need to be deployed on each tier of a multi-tiered deployment.
* Project compilation may be sped up as there are fewer project dependencies.
* Alternate implementations of the interface can be configured for use without requiring changes to the main application code. This could mean changing from MSSQL to Oracle with a simple configuration file change.

An IOC Container is a pattern which allows the application to create an instance of the interface without knowing the specific concrete class that will be used.

We use UnityContainer for Enterprise application development e.g. PRISM uses Unity. This article will give you an idea about Munq tool (replacement of Unity for Asp.net).

Munq is a very small, fast dependency injection container designed for ASP.NET applications, both Webforms and MVC. It has, by design, limited features. The main goal has been to minimize the CPU required for Resolving types from the container.

Munq is an open source project and available at codeplex: Munq@Codeplex

Some good Articles by Author Matthew Dennis:
http://www.codeproject.com/Articles/43296/Introduction-to-Munq-IOC-Container-for-ASP-NET.aspx
http://www.codeproject.com/Articles/43354/Using-Munq-IOC-with-ASP-NET-MVC-2-Preview-2.aspx

Read Full Post »