AspectMap – Aspect Oriented Programming for Complete Beginners

added by csurfleet
5/30/2012 7:36:29 AM


An introduction to AspectMap - an aspect oriented framework for StructureMap, written for those completely new to aspect oriented programming.


5/30/2012 8:32:18 AM
Nice, how does this compare to something like PostSharp which does IL weaving?

5/30/2012 8:47:56 AM
Its using the Castle DynamicProxy stuff internally, so it intercepts rather than weaves. Benefits are ease of development for me basically! There is a tiny performance overhead, but it's fairly comparable to weaving all this code into your application yourself. I'll be writing some stuff on how to configure for performance soon - if you wanted to turn off an audit attribute project wide for example it would be better to re-initialize the ObjectFactory with the aspect turned off than to have lots of interceptions not doing anything.

I'm really keen to get feedback on how people are using this kind of stuff to make a V1 release useful to as many people as possible. Adding at the moment:
- Access to the attribute causing the IAttributeHandler to be called, so you can set properties in the atttribute declaraton - i.e. [AccessCheck(MinumumLevel=5)]
- Support for the other StructureMap setup methods - XML etc