Commonality and Variation, key CSA principles
Thursday, March 23rd, 2006The principles of commonality and variation are well defined in a thesis paper by James Coplien “Multi-Paradigm Design”, (can be downloaded from: http://prog.vub.ac.be/Publications/2000/vub-prog-phd-00-01.pdf also described in his book: “Multi-Paradigm Design for C++”, published by Addison-Wesley in October of 1998 [Coplien1999], the thesis paper is essentially the book). These principles are fundamental to SunGard’s success with the CSA, and are relevant to software architecture as well as product management going forward.
As I’ve discussed in earlier blogs, the CSA uses abstraction heavily in order to make sense of the various elements and concepts found in our myriad of architectures at SunGard. Coplien’s paper addresses abstraction techniques in terms of commonality and variation since complexity and problem definition are key issues in software work today. For example, grouping is a useful technique in abstracting similar concepts. Procedures or methods form out of grouping steps of an algorithm by their relationships, and responsibilities of an encapsulated collection of related data are grouped to form classes.
Coplien’s design approach uses analyses of both the application and solution domains in parallel. It provides techniques in finding solution domain constructs that most naturally express the structure of the application domain. It seeks a match between commonalities and variabilities of the solution domain with those of the application domain to understand what solution techniques to apply to which parts of the problem, and then builds taxonomies of solution domain constructs which describe commonalities and variabilities in code using the most appropriate paradigms (classes, templates, services, modules, ordinary procedural programming, etc.), languages, objects, etc.
In summary, Coplien says that Commonality defines families (via grouping), and families are the primary basis for abstraction. Commonalities can then be expressed in a programming language (capable of multiple paradigms). Then, an analysis of how similar items differ, which yields huge abstracting power by parameterizing the variabilities of a domain.
Without spoiling too much of the fun, I’ll differ the punch lines to the paper itself. I’ll defer to the paper and recommend to the reader to download the thesis or buy the book referred to above and get familiar with these techniques. Although the constructs used in the paper are based in C++, the techniques are very applicable to Java and C# and other languages.