Unity Vs Policy Injection Application Block

Topics: Policy Injection Application Block
Nov 29, 2010 at 6:02 AM
Edited Nov 29, 2010 at 6:02 AM

I have read at many places that Unity Application block is better than PIAB. But when going through Unity Application block i have got to know that it is used for Dependency Injection whereas PIAB is used to define policies. So how they could be compared and how could we say that unity is better than PIAB.

Nov 29, 2010 at 11:14 PM

Both can do interception.  PIAB's primary use is for interception whereas Unity can do interception as well as dependency injection.  Unity provides more configurable items for interception than that of Policy Injection's.  In addition, Unity 2.0 now has the built-in PolicyInjectionBehavior which is the behavior which you can use to do the same thing that PIAB does.

Hope this helps.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Nov 30, 2010 at 12:41 AM

PIAB in Entlib 5.0 is built on top of the Unity interception mechanism. PIAB is really just a collection of handlers for wiring up Entlib blocks plus some legacy configuration goop.

 

Nov 30, 2010 at 6:10 AM

Can you pls explain how we can use Unity application block can do interception. I just know how to do dependency injectionn but can't get anything on interception for unity application block.

Nov 30, 2010 at 6:28 AM

Plesae check out the documentation first for Interception in Unity.  Feel free to post questions related to Unity in the Unity forum

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Jan 12, 2011 at 4:12 PM

So basically what you are saying is that unity has a behavior of PI and inside that behavior I can register many call handlers (that logically can be considered as behaviors as well)?

 

What is the future of PI?

Currently I’m using the logging call handler and I want to extend its functionality so I can use the original and my own in the same application. Should I implement it as call handler or interception?