Unity and ASP.NET Screencast

Patterns & Practices GuidanceI am still catching up after a week at TechEd and getting used to the fact that the kids are off from School for the summer. Ahhhhh… the joys and challenges of a stay-at-home Dad :)


This past weekend I downloaded Screenflow, which is a screencast application for the Mac. My goal was to create a new Unity and ASP.NET Screencast using Screenflow, but I need to spend a bit more time with Screenflow before I go into “production” with it. It is different enough from Camtasia, which I love, such that I need to iron out the use of Visual Studio 2008 in VMware Fusion, Apple Keynotes, the iSight Camera on the MacBook Pro, and the fact that I prefer to do the screencast using my external monitor and headset. Another week and I think I will have it all figured out.


In the meantime, I went ahead and created the screencast in Camtasia, which is a phenomenal screencast application for the PC. Therefore, if you are interested in seeing one way to get Unity IoC to work in ASP.NET Webforms for dependency injection into your pages, check out the following screencast:



You can also download the code presented in the screencast.


The screencast uses a similar technique to what you will find in the Web Client Software Factory, where you can derive your web pages from a base page class and then call UnityContainer.BuildUp on the page to do property injection into the page. Of course, the WCSF does not use Unity, but the techniques are similar. Although I don’t show it, you can use a similar technique for your MasterPages and UserControls.


Hopefully you find the screencast useful.


On a side-note, you might want to check out Ninject 1.0 – Lightning fast dependency injection for .NET, which I noticed was released in 1.0. You gotta love the contributions by the developer community.

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>