SPA Conference session: Software Design Principles - Mining Pattern DNA

One-line description:In this workshop we will work to find the underlying principles that make successful patterns effective pieces of design, in an attempt to make the principles visible and allow their use independently
 
Session format: Workshop (150 mins) [read about the different session types]
 
Abstract:Design patterns are an established way of sharing and reusing design knowledge by allowing proven, concrete solutions to reoccurring problems to be captured in a standard manner that allows their form, forces and applicability to be easily understood. Indeed patterns are now so well established that it is rare to find an undergraduate computer science or software engineering programme that does not include significant study of them.

Design principles are generally applicable design rules that, when followed, are generally agreed to result in desirable qualities in a design artefact. In contrast to patterns, design principles don't provide concrete solutions to specific problems but rather are general guidelines that designers should be aware of when creating their designs. While design patterns are a practical embodiment of good design principles, we observe that many designers using patterns don't seem to understand the principles that make them work well. Examples of design principles are "maximise cohesion", "minimise coupling", "liskov substitutability principle", "don't repeat yourself/minimise duplication" and so on.

In this session we will examine a number of patterns from established collections in order to find the design principles that they embody, collate the principles and decide which of them can be used independently of the patterns that they are usually associated with.
 
Audience background:Anyone involved in the activity of software design. Ideally participants should have some prior familiarity with patterns in general, and the well known collections in particular, but this isn't necessary.
 
Benefits of participating:Participants should achieve an understanding of design principles in general, a deeper understanding of why particular patterns work well and should also take away a set of generally useful design principles to use in their own work.
 
Materials provided:* Copies of well known pattern definitions
* Lists of candidate design principles
* Copies of the GoF, POSA1 and PEAA books
* Template form for design principle description
 
Process:* Presentation 1 - overview of the session, process and goals; recap of definitions of pattern and principle; motivations for identifying principles.

* Split the attendees into small groups. Ideally 8 groups, of 3 but we could deal with any number from 3 groups of 2 up to (say) 8 groups of 4.

* Exercise 1 - Mining Principles: distribute sets of 6 patterns to each group. Each group gets the same set, which will be 2 well known patterns from each of the GoF, PEAA and POSA1 collections, deliberately selected to contrast with each other; distribute lists of candidate principles to each group. Each group gets the same set, which will be at least a dozen identified by the presenters from existing sources; each group identifies the principles that they believe underpin each pattern and any relationships they see between them (dependency, comprised of, requires, in conflict, ...); for each principle, identify the positive and negative implications of following it and any limitations to its applicability.

* Results Gathering 1 - Principles Found: each group reports the principles found and we record these on a flip chart; normalise the results by eliminating synonyms, standardising names and so on as a group exercise; identify groups of principles that appear to be related into themes (e.g. "easy of extension", "ease of change", "comprehensibility", "performance and efficiency", ...)

* Presentation 2 - Explanation of Exercise 2

* Exercise 2 - Creating a Catalogue of Principles: break into new groups, one per principle theme found during the results gathering; each group is tasked with creating a "full" list of design principles to consider for their theme. They should use the lists created in the first exercise, principles they identify from their own experience, the lists of principles distributed in the session and the remaining patterns in the GoF, PEAA and POSA1 collections.

* Results Gathering 2 - Principle Catalogues: each group presents their catalogue to the group; overall group listens to the presentation; overall group provides suggestions for missing principles or other improvements (a la writers workshop style)

* Presentation 3 - Summary and Wrap Up: presenters summarise the session and the outputs obtained
 
Detailed timetable:00:00 - 00:15 - Presentation 1 (Overview)
00:15 - 00:20 - Exercise 1 setup
00:20 - 00:50 - Exercise 1 (Mining Principles)
00:50 - 01:10 - Results Gathering 1
01:10 - 01:25 - Break
01:25 - 01:30 - Presentation 2 (Exercise 2 Overview)
01:30 - 02:15 - Exercise 2 (Creating a Catalogue of Principles)
02:15 - 02:30 - Break
02:30 - 02:50 - Results Gathering 2
02:50 - 03:00 - Presentation 3 (Summary and Wrap Up)
 
Outputs:1. Lists of principles believed to be embodied in a number of common patterns
2. Fledgling principle catalogues for a number of themes

Both outputs will be captured on the conference Wiki, if possible, while the session is in progress.
 
History:None
 
Presenters
1. Eoin Woods
Barclays Global Investors
2. Nick Rozanski
Barclays Global Investors
3. Andy Longshaw
Barclays Bank