IntroductionA little while back, in a discussion with Sacha Barber about Dynamic Decorator and Castle DynamicProxy (see messages of Dynamic Decorator and Castle DynamicProxy Comparison), he mentioned his work on bringing AOP to MEF. It didn't catch much of my attention until recently I got chance to read his article Bringing AOP to MEF. The advancement of object technologies hasn't made AOP any easier. Out of box, none of IoC containers support AOP as far as I know. Sacha Barber's pioneer work made me aware of this gap and inspired me to come up with ideas for this article. In this article, I introduce an AOP model for MEF based on Dynamic Decorator. Using this model, you configure aspects for objects and the MEF brings the objects in life with the aspects attached to them.
Background The Dynamic Decorator is a tool for extending functionality of objects by attaching behaviors to them instead of by modifying their classes or creating new classes. It is attractive because it saves you from design or redesign of your classes. Please read the articles Dynamic Decorator Pattern and Add Aspects to Object Using Dynamic Decorator to understand more about the Dynamic Decorator, what problems it tries to solve, how it solves the problems and its limits. Read more: Codeproject
QR:
Background The Dynamic Decorator is a tool for extending functionality of objects by attaching behaviors to them instead of by modifying their classes or creating new classes. It is attractive because it saves you from design or redesign of your classes. Please read the articles Dynamic Decorator Pattern and Add Aspects to Object Using Dynamic Decorator to understand more about the Dynamic Decorator, what problems it tries to solve, how it solves the problems and its limits. Read more: Codeproject
QR: