Inversion of Control
Took a bit of a drive over the weekend and decided to take advantage of that time by catching up on some .NET Rocks Podcasts. One that piqued my interest is James Kovacs Inverts our Control! (more from his blog here). It begins with with Robert Martin's Dependency Inversion Principal leading onto a discussion of Inversion of Control (Ioc) Containers. This lead me to an MSDN article by James Kovacs titled "Tame Your Software Dependencies for More Flexible Apps"which provides much of the same content but perhaps in a bit more coherent way. A bit more digging/Googling lead to a number of resources on .NET based Ioc containers including one about to be released by Microsoft named Unity. A number of web casts by David Hayden on the Unity Ioc can be found here. Also ran into this blog entry which discusses Ioc containers vs. factories/factory method patterns. This blog entry discusses how to use a "static gateway" pattern to avoid coupling your application to a particular Ioc container as well. All this "stuff" goes quite well with my current research on on to best implement LINQ in an n-tier scenario while keeping the business logic nicely decoupled from the data access layer. Interesting stuff!
Update 08/27/2008: More Samples on Dependency Injection into ASP.NET web pages can be found here.