Should the ComponentDesignPatterns be formatted using the AlexandrianForm? JoshuaKerievsky convinced me at ChiliPLoP'99 that it allows the reader to better capture the essence of the pattern, and that design pattern elements normally found in CanonicalForm and GoFform can be included without affecting it.
I've already converted LayeredFrameworks to AlexandrianForm. I think it fits the themes that are more decision-oriented in a better way than the others do.
Thoughts? And as Ward says above, its format might be more wiki friendly.
[ComponentDesignPatterns | ComponentDesignPatternsDiscussion]
Context
A paragraph-based description of a situation you might be in when the pattern might apply to a problem you are trying to solve.
An Applicability section might be added that describes a list of bullet points that qualify or disqualify the use of the pattern in your context.
Problem
Posed as a question.
Forces
A bulletted list of forces that describe the conflicts inside the problem.
Solution
Possibly in terms of other patterns, see ContextIndependence.
Solution can also have Participants, Structure, and Collaborations sections if it helps convey the theme to the reader. More design-like patterns will probably delve into this level of detail.
Resulting Context
Including new problems to be solved and the patterns that can solve them.
Here, Benefits/Liabilities can be covered in a Consequences section if this amount of detail is important for the pattern in question.
Known Uses
Sometimes a part of Example depending on the type of pattern. The RuleOfThree should govern that at least three known uses exist for the pattern, and as many as necessary should be written in this section to help the reader relate to it.
Example
More detailed than Known Uses, can include code and/or diagrams. Especially for pattern at the design level -- many times source code can help the reader understand a specific implementation instance that can result from the pattern.
Implementation and Sample Code sections can be outlined in Example for more design-like patterns.
Related Patterns
Compare and contrast to other patterns, rather than lead the reader on to solve problems in the resulting context.
Discussion
Discussion takes place after horizontal rule (e.g., as below). Sometimes discussion has taken place elsewhere (e.g., ComponentDesignPatternsDiscussion) and is consolidated into the pattern's discussion. Other times, as the pattern is being constructed, discussion intertwined in the pattern is moved below.
I've been thinking about this some more. I agree that higher level patterns don't really fit into the GoFform very comfortably; the CoplienForm seems more natural. This is especially true, IMHO, for process patterns such as CookbookApproach and CautiousBuyOverBuild.
However, I don't think that there is a cut-off point at which the pattern language stops being high-level and suddenly becomes low-level, and I think the sudden change of pattern format would disturb the "flow" of the pattern language. Therefore, I'd prefer to see all the patterns in a Coplien-like format, along the lines of: (see pattern format above -ed)
What do people think? I know it's only a stylistic issue and not the most important at the moment. However, if you're up for it I don't mind refactoring some of the pages.
BradAppleton: Some folks use a little bit of both. See CanonicalForm for a description of how each maps "roughly" to the other (see also PatternForms). --
PhilipEskelin: I like CanonicalForm in its simple form for more design-centric patterns (e.g., ContainerManagedPersistence or ConnectionSingleton). The expanded form specified by BradAppleton can be used for the higher-level patterns.
Does anybody care that I wrote the prototype for this [DistributionOfComponents] in CoplienForm? I think it fit the scope of the pattern better. Perhaps we can use the CoplienForm for our higher-level patterns and leave the more design-heavy ones in GoFform.
NatPryce: I prefer the CoplienForm to the GoFform for both high level patterns and low level design patterns. CoplienForm leads the reader forward from their problem to a (partial) solution and then further on to patterns that solve the resultant problems. I think that this is part of what is meant by "generative" patterns. I feel that the GoFform acts in reverse -- it gives a more explanatory feel to the pattern.
Much better! --NatPryce
PhilipEskelin: Nat, I'm game . . . I feel the same way, but was too lazy to come up with a better idea. Let's try it and see if it catches on. It helps especially in areas like this one where multiple people discuss something between the horizontal rules. I'll need to get used to not putting my name at the end, however (NullName?) ;-)
NatPryce: in long discussions, it is helpful to make the names of the "speakers" bold, as done with this sentence.
[ComponentDesignPatterns | CategoryPattern]
Context
Applicability
Problem
Forces
Participants
Structure
Collaborations
Resulting Context
Consequences
Known Uses
Example
Implementation
Sample Code
Related Patterns
JoshuaKerievsky: Fellows, listen, it is time to drop the various pattern forms and realize that Alexander and company had a very good form, that utterly blows away the forms our community has decided to create. If you don't believe what I'm saying, send me three consecutive patterns from your language, and I'll rewrite them to prove my point. I recently did this with three of Cope's Org patterns, and many who have seen this, including Cope, agree that the rewritten patterns work better because of the Alexandrian form.
PhilipEskelin: Joshua, you definitely convinced me at ChiliPlop that this is the way to go. So far I've converted one pattern, LayeredFrameworks, to AlexandrianForm. As I have time to convert more of them, I wonder how well this format will bring out structure, collaborations, etc. in design patterns. My plan is to put these sections into the problem/solution area as illustration elements that help deliver the pattern-in-question's essence.
What do other folks think about ComponentDesignPatternsFormat being in the AlexandrianForm?
Go for it! -- NatPryce.
This page mirrored in ComponentDesignPatterns as of April 29, 2006