User Tools

Site Tools


about:navigating_principle_languages

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
about:navigating_principle_languages [2013-09-13 16:09] christianabout:navigating_principle_languages [2013-09-14 15:47] – judgment christian
Line 127: Line 127:
 As a result we get {LC, KISS, RoE, TdA/IE, ML} as the characterizing set. As a result we get {LC, KISS, RoE, TdA/IE, ML} as the characterizing set.
  
-Note that although in this example the principles are examined in a certain order. Nevertheless the method does not prescribe any.+Note that although in this example the principles are examined in a certain orderthe method does not prescribe any.
  
  
 ==== Using the Characterizing Set ==== ==== Using the Characterizing Set ====
 +
 +In order to answer the above question, we have to informally rate the solution based on the principles of the characterizing set:
  
   * LC   * LC
 +    * The solution creates a relatively strong coupling to the concrete implementations of the components. If a class uses the "factory" and the components it gives access to, there is no way to have the class use other implementations of the components. There is no way to replace the implementations by a stub for testing purposes, there is no way to smoothly switch to another ''Data'' component possibly using another way of storing the data. Every change in the arrangement of the classes needs a change in the code. LC is rather against this solution.
   * KISS   * KISS
 +    * The solution is pretty easy to implement. Furthermore it is easy to get access to an arbitrary component. So according to KISS this is a good solution.
   * RoE   * RoE
 +    * Getting access to a component is implicit. There is no need to explicitly pass a reference around. There is not even the necessity to explicitly define an attribute for the dependent class. RoE tells, that the solution is bad.
   * TdA/IE   * TdA/IE
 +    * Getting access to a the ''Store'' subcomponent requires asking ''DataIfFactory'' for the ''Data'' component and asking that one for the store. There is no way to tell the "factory" to do something. TdA/IE is against the solution.
   * ML   * ML
 +    * There are no particular pitfalls with this solution. So ML has nothing against it.
 +
 +So LC, RoE and TdA/IE are against the solution, KISS thinks it's good and ML has nothing against it. As it is not the number of principles which is important, the designer still has to make a sound judgment based on these results. What is more important: Coupling, testability, and clarity or a simple and fast implementation. In this case we'd rather decide that the former are more important, so we should rather think about a better solution.
about/navigating_principle_languages.txt · Last modified: 2013-09-16 17:27 by christian