These concepts have been around for quite a few years: from Martin Fowler’s description to this month’s MSDN magazine’s tutorial. Stefano Mazzocchi wrote: “IOC is about enforcing isolation.” Not many would argue that the n-tier architecture is a bad thing, however have you ever tried instantiating one class from the business tier by itself?
To facilitate such a scenario, the idea of dependency injection and containers comes into play. One example of such a tool for .Net is Castle Windsor. This open source project allows a user to “Separate Concerns” by injecting dependencies through an xml specification.
As with many, I have a love hate relationship with xml configuration files. For example, Oren Eini has created Binsor to combat his xml irritations. My thought is instead; let us put it in a database.
I plan to use some new interesting technologies to do this. The idea is to use SQL Express with LINQ to SQL to handle the object relational mapping. Then I will use LINQ to XML to auto generate an XML document [I could probably bypass the Xml Interpreter altogether if wanted]. From there I will use WCF to expose the generated xml as a service. Once this is done, we will talk about GUI’s to update the database.
So let’s get started.