Wednesday, August 23, 2006

Patterns of Failure

In many professional disciplines—programming, architecture, design, and so on—design patterns often provide a handy way to tackle a specific, well-defined task. When used correctly, they can save countless hours of mundane, boring tedium. Life is good.

As a generally optimistic and analytical bunch, humans tend to think of patterns in this regard. But that's not to say that that all patterns are good. Bad patterns can, and often do, unravel hours of hard, high-quality work, whether you're building software or pressure washing a driveway. So very often, these have little to do with technology, engineering, or the most basic human logic.

Thursday, August 10, 2006

Implementing Polymorphic Configuration in MS.NET 2.0 using the MSEL

If you've used Microsoft's Enterprise Library very much, then you've probably noticed how nicely the configuration files seem to come together. Despite being incredibly complex at times, these are often akin to the .NET provider model configuration, where entire configuration nodes are pluggable with previously unknown configuration types. The EL does this by allowing you to specify two types for these types of nodes via XML attributes -- one for the configuration element's concrete type, and one for the actual type of object you are setting up.