patterns:parameter_object
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
patterns:parameter_object [2013-07-28 09:32] – [Pattern Collections] christian | patterns:parameter_object [2021-10-18 22:24] (current) – +++ restored +++ christian | ||
---|---|---|---|
Line 16: | Line 16: | ||
===== Problem ===== | ===== Problem ===== | ||
- | * Often there are methods which take a large number of input parameters. This makes using them cumbersome and the code less readable. | + | * Often there are methods which take a large number of input parameters. This makes using them cumbersome and the code less readable. See [[anti-patterns: |
- | * A second problem is the evolution of method signatures. There are circumstances where there is the chance that in the future further parameters will be added without all the users of the method needing the new parameter. [[glossary: | + | * A second problem is the evolution of method signatures. There are circumstances where there is the chance that in the future further parameters will be added without all the users of the method needing the new parameter. [[glossary: |
- | ===== Structure ===== | + | ===== Solution ===== |
+ | |||
+ | |||
+ | ==== Structure ==== | ||
+ | |||
+ | ==== Dynamics ==== | ||
+ | |||
+ | ==== Implementation Hints ==== | ||
+ | |||
+ | ==== Variations | ||
- | ===== Variations ===== | ||
===== Origin ===== | ===== Origin ===== | ||
{{page> | {{page> | ||
+ | |||
===== Advantages ===== | ===== Advantages ===== | ||
Line 36: | Line 45: | ||
* [[principles: | * [[principles: | ||
* [[principles: | * [[principles: | ||
+ | |||
===== Relations to Other Patterns ===== | ===== Relations to Other Patterns ===== | ||
- | ===== Pattern Collections | + | ==== Generalizations ==== |
+ | |||
+ | ==== Specializations ==== | ||
+ | |||
+ | * [[Selector Object]] | ||
+ | * [[Curried Object]] | ||
+ | |||
+ | ==== Alternative Patterns ==== | ||
+ | |||
+ | ==== Complementary Patterns ==== | ||
+ | |||
+ | ==== Pattern Collections ==== | ||
{{page> | {{page> | ||
+ | |||
+ | |||
===== Examples ===== | ===== Examples ===== | ||
==== Example 1: Event Args ==== | ==== Example 1: Event Args ==== | ||
- | A typical usage of this pattern is the groping | + | A typical usage of this pattern is the grouping |
* In .NET there is the class [[http:// | * In .NET there is the class [[http:// | ||
Line 55: | Line 78: | ||
On the other hand the parameter object pattern is already applied here. The parameters lpProcessAttributes, | On the other hand the parameter object pattern is already applied here. The parameters lpProcessAttributes, | ||
+ | |||
===== Description Status ===== | ===== Description Status ===== | ||
/* Choose one of the following and comment out the rest: */ | /* Choose one of the following and comment out the rest: */ | ||
- | /*[[wiki: | + | [[wiki: |
/ | / | ||
/ | / | ||
+ | |||
===== Further Reading ===== | ===== Further Reading ===== | ||
Line 66: | Line 91: | ||
* [[wiki> | * [[wiki> | ||
* [[wiki> | * [[wiki> | ||
+ | |||
===== Discussion ===== | ===== Discussion ===== | ||
Discuss this wiki article and the pattern on the corresponding [[talk: | Discuss this wiki article and the pattern on the corresponding [[talk: | ||
+ |
patterns/parameter_object.txt · Last modified: 2021-10-18 22:24 by christian