AlgorithmicPrimitives
- Sequence
- Selection
- Iteration
ObjectPrimitives
- Encapsulation
- Inheritance
- Polymorphism
consider also:
- Identity
- State
- Type
and for networks:
- Distribution
- Concurrency
- Availability
The PatternPrimitives page was prompted by the question "What are patterns made of?", it's not a definitive answer. More like a sketch of a beginning of an answer.
The question will strike some as ridiculous, after all a pattern is an emergent property, irreducible, remove any part and the pattern vanishes.
Also the whole page brings into question many of the assumptions made by the alexandrine style of formal patterns that has such a history here.
Are the concepts listed above patterns in their own right that we have used so much that we no longer consider them patterns? --LarryPrice
Perhaps all design patterns can be boiled down to selections between two choices:
- Add indirection to manage flexibility
- Remove indirection to improve performance
Kinds of indirection:
- Reification
- Polymorphism
- Delegate to method(s)
- Delegate to object(s)
- Record and defer
- Reference indirection
- Conditionals
Things that can be redirected:
- Data flow
- Object references
- Object creation
- Control flow
- Queries
- Commands
Very nice classification approach -- which patterns fail to fit anywhere?
Which patterns describe removing indirection?
Several of the RefactoringPatterns, such as InlineMethod, remove unnecessary indirection. Also some OptimizationPatterns remove indirection to improve performance.
There are some thoughts about this in the pattern detection research field. There's a paper [1] that uses "fragments" which include "classes, methods, parameters, using relations, inheritance relations, and containment relations."
[1] Florijn, G., M. Meijers, and P. van Winsen (1997) "Tool Support for Object-Oriented Patterns", ECOOP '97 Lecture Notes in Computer Science no. 1241, Springer-Verlag
http://www.serc.nl/people/florijn/work/patterns.html
Related to CategoryGroupsOfPatterns