Intercepting Filter Pattern

March 6, 2007 at 2:13 pm (Patterns)

If you’ve no idea what patterns are – where have you been ? – then the book “Design Patterns: Elements of Reusable Object-Oriented Software” (ISBN 0-201-63361-2) is essential reading, as is the Data and Object Factory site.

The more C#-oriented among us might like to read James Cooper’s “C# Design Patterns” (ISBN 0-201-84453-2) and Christian Thilmany’s “.NET Patterns” (ISBN 81-297-0290-8).

Patterns are a software design technique which provides solutions to common scenarios, helps you identify such scenarios and identify patterns of your own.

There are a lot more design patterns out there than the recognised Gang of Four’s. Identifying which pattern could be implemented to solve a particular type of development scenario is only scratching the surface. Sure this will save you time and improve the consistency of your designs, but part of becoming a good patterns practitioner is to be able to spot new patterns emerging as you become more experienced.

These can range from relatively simple UI implementation patterns – of which there are many – to more complex patterns dealing with request brokers, factories, pipeline processing and so on. This is as much of an intro as you’re going to get from me :)

“So what’s an intercepting filter pattern when it’s at home ?” you cry. This is a link to another article by Jon Wojtowicz.. it’s an interesting article – sequential processing of data. The article resonated with me as it seems to describe Biztalk 2004/06’s pipeline-preprocessing model, something I have been working a lot with lately.

As the article mentions, the pattern does not describe workflow-style orchestration but rather a flow of data through pluggable components. These components fit the GoF mantra “program to an interface, rather than an implementation” and in much the same way as Biztalk pipeline components, can be reused and rearranged in different orders by encapsulating classes without requiring change within the component classes themselves. Nice.

Order Processing might be a scenario this would fit into, though I think Order Processing is more of a workflow/orchestration-type process. Data migration and data integration-type scenarios fit this pattern pretty well.

Post a Comment