Skip to main content

Home/ Coders/ Group items tagged codeinjection

Rss Feed Group items tagged

Joel Bennett

Policy Injection App Block - Behind the Scenes - 0 views

  • We use an interception mechanism to get in the way of calls going to that member, collect a list of policies that apply using a matching rules mechanism, run the chain of handlers specified by those policies in a chain of responsibility and at the other end dispatch the call to the target. Once the target is done - successfully or with exceptions - the stack unwinds, returning through each handler and finally back to the caller.
    • Joel Bennett
       
      So we can only advise "before"
  •  
    Very good read (particularly their evaluation of weaving methods).

    Although as a result their "Policy Injection" application block isn't as powerful as most of the straight-up AOP toolkits out there, it does have a *huge* upside: not only is the code produced by this supportable by Microsoft Product Support, it's now officially part of the Patterns and Practices recommendations!

    The down side is that the only injectable objects are ones created through a "Factory" method (you can't just use the *new* constructor) this brings some performance hits ... but then, you get the ability to separate concerns and apply policies and even business rules after the fact!
1 - 1 of 1
Showing 20 items per page