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 revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
patterns:parameter_object [2013-07-23 16:06] christianpatterns:parameter_object [2021-09-02 19:13] – old revision restored (2021-03-29 09:39) 65.21.179.175
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:Long Parameter List]] and [[anti-patterns:Data Clumps]]. Sometimes this is also a sign of [[anti-patterns:Primitive Obsession]]
-  * 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:Events]] are an example for that. Normally a change to a method parameter technically requires every caller to change also independent of whether the caller is logically required to change. +  * 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:Events]] are an example for that. Normally a change to a method parameter technically requires every caller to change also---independent of whether the caller is //logically// required to change. This leads to [[glossary:ripple effects]] and [[glossary:shotgun surgery]].
 ===== Structure ===== ===== Structure =====
  
Line 39: Line 38:
 ===== Relations to Other Patterns ===== ===== Relations to Other Patterns =====
  
-===== Pattern Collections =====+==== Generalizations ====
  
 +==== Specializations ====
 +
 +  * [[Selector Object]]
 +  * [[Curried Object]]
 +
 +==== Contrary Patterns ====
 +
 +==== Complementary Patterns ====
 +
 +===== Pattern Collections =====
 +{{page>collections:Patterns for Arguments and Results#Box}}
 ===== Examples ===== ===== Examples =====
  
patterns/parameter_object.txt · Last modified: 2021-10-18 22:24 by christian