User Tools

Site Tools


principles:generalization_principle

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
principles:generalization_principle [2021-09-02 11:48] – old revision restored (2021-05-12 02:05) 65.21.179.175principles:generalization_principle [2021-09-02 17:50] – old revision restored (2021-05-12 02:04) 65.21.179.175
Line 9: Line 9:
  
   * [[contexts:Object-Oriented Design]]   * [[contexts:Object-Oriented Design]]
 +  * [[contexts:API Design]]
 +  * [[contexts:Architecture]]
 +  * [[contexts:User Interface Design]]
  
 ===== Principle Statement ===== ===== Principle Statement =====
Line 21: Line 24:
 A general solution abstracts from the specific tasks and solves a superset of them. Parameterization of some kind is used to specify what has to be done in a given situation. A general solution abstracts from the specific tasks and solves a superset of them. Parameterization of some kind is used to specify what has to be done in a given situation.
  
 +A module can be more general than another one. But there are two aspects of this: First of all there is functionality. If module ''A'' can do the same as module ''B'' plus something more then ''A'' is more general. The second aspect is the one of what has to be done in order to exploit the generality. An ideal case would be that nothing has to be done and the module just does more. Other possibilities are that a configuration file has to be changed, an attribute has to be set, an invocation parameter has to be adjusted, etc. The least general possibility would be a module which can be changed easily. This is still better than a rigid module but less general than modules which do not need such changes. This form of generality is often rather called "flexibility" (({{page>resources:Designing Software for Ease of Extension and Contraction#reference}})).
 ===== Rationale ===== ===== Rationale =====
  
principles/generalization_principle.txt · Last modified: 2021-10-20 21:20 by christian