Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://msdn.microsoft.com/en-us/library/cc309370.aspx" rel="nofollow noreferrer">The MSDN documentation for Policy Injection</a> has a pretty clear explanation:</p> <blockquote> <p>Applications include a mix of business logic and crosscutting concerns, and the two are typically intermingled—which can make the code harder to read and maintain. Each task or feature of an application is referred to as a "concern." Concerns that implement the features of an object within the application, such as the business logic, are core concerns. Crosscutting concerns are the necessary tasks, features, or processes that are common across different objects—for example, logging, authorization, validation, and instrumentation. The purpose of the Policy Injection Application Block is to separate the core concerns and crosscutting concerns.</p> </blockquote> <p>Simply put, the PI block lets developers define a set of policies that specify the behavior of objects in the system. So your core business logic, such as the code that calculates profit per unit in a fiscal year (one concern), is separated from the logging of that execution of logic (another, but more often used, concern). </p> <p>The same documentation says that the PI block is <em>not</em> AOP because:</p> <ul> <li>It uses interception to enable only pre-processing handlers and post-processing handlers. </li> <li>It does not insert code into methods. </li> <li>It does not provide interception for class constructors. </li> </ul> <p>So trying to look at PI from an AOP perspective can muddy the waters a bit.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload