skip to the main content area of this page
Patterns and Practices

Integrating the Policy Injection Application Block with WCF Services


An article in the February 2008 MSDN Magazine provides information on how to integrate the Policy Injection Application Block with WCF Web Services. Per the article-

"One of the most important software design principles is the separation of different responsibilities within our applications. In service-oriented design, we separate applications into services and operations. In real life, however, implementation concerns tend to leak into the services.

This is a problem not only in service-oriented design, but in object-oriented design as well. Enterprise Library 3.0 introduced the Policy Injection Application Block (PIAB) to solve this problem in object-oriented design. At the time of this writing, however, the latest version of Enterprise Library (3.1) doesn't directly support the integration of PIAB with Windows® Communication Foundation (WCF) services, so using PIAB to separate concerns in service-oriented applications might seem daunting. But, as you'll see, it's easy enough with the right techniques. Let's get started.

To leverage the PIAB, you must have control over how your objects are instantiated. With service frameworks like WCF that abstract object instantiation away from the developer, this creates a problem when trying to integrate the PIAB. However, WCF provides a variety of extensibility points through behaviors. Here we will show you how to leverage custom WCF behaviors in order to apply PIAB at the WCF service point without requiring additional code. With WCF service successfully integrated, PIAB can truly become a ubiquitous framework for separating service logic from cross-cutting implementation details..."

Read more.


 


Tags: PolicyInjectionApplicationBlock, WCF


Topics



Popular Tags



Recent Links