Working with SOA Design Patterns: Understanding Pattern Relationships
SOA design patterns can and often should be interdependent. Implement a proper relationship between design patterns in order to make your SOA solution the best that it can be.
Before we conclude, let's briefly introduce the concepts of a pattern application sequence and a pattern language. We just explained how Contract Centralization supports Logic Centralization, but when designing services, which pattern do you apply first? Although there is no absolute rule, you might have a preference. For example, when modeling a collection of services at the same time, it would probably make sense to begin with Logic Centralization in order to properly partition services into distinct units of logic. Then you can apply Contract Centralization so that each of these units (services) is given a technical contract as its official entry point.
What we've just described is a pattern application sequence consisting of two patterns applied in a specific order. A pattern catalog is ideally structured so that you can come up with many creative application sequences depending on your requirements, preferences, and constraints. Some catalogs even provide recommended pattern sequences where as much as individual patterns are considered proven design solutions, the application sequences themselves are also considered proven.
The freedom to combine patterns into endless sequences is what makes a pattern catalog more than just a documentation of design patterns; it's what makes it a "pattern language." As with any written language, you have words that can be strung together into sentences that are further combined into paragraphs, essays, and so on. Think of a pattern language in the same way. When you take a pen to paper you will, depending on your skills, create a great or not-so-great work of literature. Similarly, the key to working with a language of patterns also lies in your knowledge and insight of the patterns themselves. A big part of this insight can be gained by understanding how patterns relate.
Thomas Erl is the world's top-selling SOA author, series editor of the Prentice Hall Service-Oriented Computing Series from Thomas Erl and editor of The SOA Magazine. He is also the founder of SOA Systems and the SOA Certified Professional program. Erl currently has 24 authors writing for his book series.



