Do you really think this will be workable? I'm extremely skeptical...
I started trying to use MAF for composable applications and gave up - there's simply too much overhead involved in manually writing adapter classes, and the pipeline builder tool has no real support (that I could see) for inheritance hierarchies between
contracts and makes casting between contracts too difficult; the sort of things you're highly likely to want for composable applications. So, you end up having to write (huge) amounts of adapter code.
Personally, I can't help but think that MAF is doomed to limited use - it introduces too much complexity for the sake of versioning, making you pay this price irrespective of whether you need to adapt contract interfaces. Maybe there are technical reasons
for this, but superficially at least, I don't get why it wouldn't instead have been possible to have components interface directly with contract interfaces, and inject adapter proxy classes only when/if needed. I guess maybe it's related to resource management
of addins between appdomains.
Just seems that unless this adapter infrastructure can be hidden, (IMO) it's never going to be used for composable apps.
If you guys can actually find some way to consolidate the two system without creating an ugly monster I'll be extremely impressed.
There are a couple of ideas from MAF though which I think are good, and which could be added to MEF - the main one being transitive closure of contracts. I'd rather see addition of this and a binary packaging model for addins than creation of a MEF-MAF
If you could add these features (in order of importance):
- binary packaging and distribution model (handle installation, conflict resolution between contract assemblys - must be strongly named, must have same content hash)
- ability to enforce and identify transitive closure of contracts (plus enforce strong naming etc.)
- AppDomain isolation to allow safe use of weakly named assemblies (though contract assemblys must be strongly named).
- transparent injection of contract interface adapter proxies (for version adaptation)
I'd personally be in composable application nirvana :)