|
|
|
Community Member
|
|
Just wanted to get some feedback. Someone just created a very basic AOP style framework using delegates and chaining (<!-- m --><a class="postlink" href="http://www.codeproject.com/KB/tips/aspectf.aspx">http://www.codeproject.com/KB/tips/aspectf.aspx</a><!-- m -->). It does not do any IL weaving.
Can someone provide some feeback on negatives and positives? Would be nice to get two sides of the story.
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
The positive of AspectF is that it's pure functional programming. It has been possible for ages in functional languages, for instance in JavaScript or Perl.
The negative is that it solves only a small class of problems. It solves quite easily problems like exception handling, automatic retries, and so no, because the aspect does not depend on the context in which it has been applied. But if the aspect does depend on this context, for instance because it needs to know the calling method name or the value of pameters, functional programming 'aspects' are of no help.
Another limitation of functional programming 'aspects' is that there is no quantification, i.e. you cannot apply an aspect to a set of targets using a single line.
I think not a single member of the AOP community would consider AspectF as an aspect framework. It is pure functional programming, which is noble enough, and it's good attention comes to what functional programming adds to object-oriented programming.
-gael
|
|
|
|