After reading Mike Taulty’s post “Metadata Classes – A Force for Good or Evil?” , I realized that this is something that I was highly annoyed with in the past, and never got a chance to write anything about. If you haven’t seen them yet, “metadata classes” as Mike refers to them are a way to extend the metadata of code that doesn’t belong to you. For example, in ASP.NET Dynamic Data you get a set of tool-generated types and can’t decorate them with attributes directly because these attributes...
Two-phase initialization is an architectural pattern for artificially breaking and managing coupling between strongly coupled components. The motivation and implementation of this pattern are not always obvious, so I will give a couple of examples to demonstrate. Let’s take an operating system as an example. Some of the components involved in the initialization of the operating system are the I/O manager, the memory manager, the object manager and many others. At runtime, the strong...