Unity Dependency Injection Video using ASP.NET Webforms - Ninject and Autofac IoC Too!

Unity VideoI put together a second video on how to use the Unity Application Block for dependency injection and inversion of control with ASP.NET Webforms Applications:

This Unity Video shows how to create a custom HttpModule to inject dependencies into your ASP.NET Web Pages, UserControls, and MasterPages without using base pages. For those of you familiar with the Web Client Software Factory v1.0 and 1.1, you will remember this technique. Web Client Software Factory v2.0 abandoned this dependency injection technique for the base class model. If you search on the WCSF Forums, you will find some custom code I wrote for the older WCSF to extend it to include UserControls and MasterPages just like I mention in this Unity Video.

Since Autofac uses a custom Http Module in this very same manner, I thought it would be useful to show this in the video. As a bonus :), I also create a NinjectHttpModule, which is a custom Http Module for those of you using Ninject, to do the same dependency injection into ASP.NET Web Pages, UserControls, and Master Pages with Ninject. I hope you enjoy the Unity Video as well as the look at two other IoC Tools - Autofac and Ninject.

The previous Unity Video also discussed using Unity IoC with ASP.NET Web Pages using base classes:

When you look through the list of Patterns & Practices Screencasts, you will find a video on Unity with ASP.NET MVC Framework as well.

I will be switching gears now to do some screencasts on the Composite Application Guidance for WPF, better known as Prism.

I hope you enjoy the screencast.

David Hayden - Florida .NET Developer

posted on Friday, July 04, 2008 11:00 PM

Main

News

Green Tea

.NET Development

Enterprise Library

Patterns & Practices