Thursday, October 30, 2008

System.AddIn

I wish I had more time to write more often, but I've been quite busy lately. I have however something to share, and it's not much since it's publicly available, but it's still something worth having a look for those who, like me, didn't know about it until yesterday.

I'm talking about the System.AddIn namespace (the 3.5 version, it's an assembly you must reference).

While researching for plug-in frameworks, I've found that our beloved framework allows you to create extensible applications with very little effort. You don't have to code your own assembly attributes, your own interfaces, your own versioning gimmicks, and more importantly your own external assembly loading routines (which are most likely to revolve around the black magic-y world of AppDomains). This doesn't mean, however, that you don't have to design the way these addins interface with your host application - that's another story.

Two CLR Inside Out columns (this, and this one) introduce the System.AddIn pipeline. I wish I'd found this stuff sooner.

Two things I do not like: The first is the way the pipeline is layed out in terms of directory hierarchy; it's surely clean enough, but I don't like it when someone else decides where I should put my assemblies (.NET has a local assembly copy paradigm if you aren't going the GAC route), so, in this regard, it could be improved and allow for a little bit of customization. The second, you need to create different projects for the pipeline segments and I for one already have to deal with enough projects already. However, the shining beauty of this umpteenth incredibly useful feature of .NET quickly dissipates any shadow of doubt. Man, I can't believe I just wrote that.