User Tools

Site Tools


patterns:parameter_object

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
patterns:parameter_object [2013-08-04 15:05]
christian
patterns:parameter_object [2016-07-20 13:15]
149.126.110.238 spelling error
Line 28: Line 28:
 ==== Implementation Hints ==== ==== Implementation Hints ====
  
 +==== Variations ====
  
-===== Variations ===== 
  
 ===== Origin ===== ===== Origin =====
  
 {{page>​resources:​Arguments and Results#​reference}} {{page>​resources:​Arguments and Results#​reference}}
 +
  
 ===== Advantages ===== ===== Advantages =====
Line 44: Line 45:
   * [[principles:​More Is More Complex|MIMC]]:​ An additional class is introduced   * [[principles:​More Is More Complex|MIMC]]:​ An additional class is introduced
   * [[principles:​Keep It Simple Stupid|KISS]]:​ Calling the method is more complex as the parameter object has to be instantiated ​   * [[principles:​Keep It Simple Stupid|KISS]]:​ Calling the method is more complex as the parameter object has to be instantiated ​
 +
  
 ===== Relations to Other Patterns ===== ===== Relations to Other Patterns =====
Line 60: Line 62:
 ==== Pattern Collections ==== ==== Pattern Collections ====
 {{page>​collections:​Patterns for Arguments and Results#​Box}} {{page>​collections:​Patterns for Arguments and Results#​Box}}
 +
  
 ===== Examples ===== ===== Examples =====
Line 65: Line 68:
 ==== Example 1: Event Args ==== ==== Example 1: Event Args ====
  
-A typical usage of this pattern is the groping ​of parameter in [[glossary:​events]]. Some events carry large amounts of context data. Furthermore modifying the signature of an event causes large ripple effects as they are typically used on the interface to other subsystems, layers, etc. and there is an unknown and probably large amount of users of the event.+A typical usage of this pattern is the grouping ​of parameter in [[glossary:​events]]. Some events carry large amounts of context data. Furthermore modifying the signature of an event causes large ripple effects as they are typically used on the interface to other subsystems, layers, etc. and there is an unknown and probably large amount of users of the event.
  
   * In .NET there is the class [[http://​msdn.microsoft.com/​de-de/​library/​vstudio/​system.eventargs.aspx|System.EventArgs]] and its descendants.   * In .NET there is the class [[http://​msdn.microsoft.com/​de-de/​library/​vstudio/​system.eventargs.aspx|System.EventArgs]] and its descendants.
Line 75: Line 78:
  
 On the other hand the parameter object pattern is already applied here. The parameters lpProcessAttributes,​ lpThreadAttributes,​ and lpStartupInfo are pointers to structures which hold further arguments. This is the procedural equivalent of a parameter object. On the other hand the parameter object pattern is already applied here. The parameters lpProcessAttributes,​ lpThreadAttributes,​ and lpStartupInfo are pointers to structures which hold further arguments. This is the procedural equivalent of a parameter object.
 +
  
 ===== Description Status ===== ===== Description Status =====
Line 81: Line 85:
 /​*[[wiki:​Incomplete]]*/​ /​*[[wiki:​Incomplete]]*/​
 /​*[[wiki:​Complete]]*/​ /​*[[wiki:​Complete]]*/​
 +
  
 ===== Further Reading ===== ===== Further Reading =====
Line 86: Line 91:
   * [[wiki>​Parameter Object]]   * [[wiki>​Parameter Object]]
   * [[wiki>​Argument Object]]   * [[wiki>​Argument Object]]
 +
  
 ===== Discussion ===== ===== Discussion =====
  
 Discuss this wiki article and the pattern on the corresponding [[talk:​patterns:​Parameter Object|talk page]]. Discuss this wiki article and the pattern on the corresponding [[talk:​patterns:​Parameter Object|talk page]].
patterns/parameter_object.txt · Last modified: 2016-07-20 13:15 by 149.126.110.238