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
Just want to say what a great blog you got here!
I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!
Thumbs up, and keep it going!
Cheers
Christian, iwspo.net
[...] to VoteMunq : IOC Container for Asp.net MVC and WebForms « .Net Knowledge … (5/17/2010)Monday, May 17, 2010 from Hiren PatelMunq is a very small, fast dependency injection container [...]
Just want to say what a great blog you got here!
I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!
Thumbs up, and keep it going!
Cheers
Christian,Earn Free Vouchers / Cash