User Tools

Site Tools


principles:information_expert

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
principles:information_expert [2013-02-10 22:47]
christian relations; IE => TdA/IE
principles:information_expert [2013-05-19 22:09] (current)
Line 1: Line 1:
-====== ​Tell Don't Ask/Information Expert ​(TdA/IE) ====== +====== Information Expert [see TdA/IE] ======
- +
-===== Variants and Alternative Names ===== +
- +
-  * Expert +
-  * Do It Myself +
- +
- +
-===== Context ===== +
-/* fill in contexts here: */ +
-  * [[contexts:​Object-Oriented Design]]  +
- +
- +
-===== Principle Statement ===== +
- +
-Assign a responsibility to this [[glossary:​module]] which has the largest subset of the required information. +
- +
- +
-===== Description ===== +
- +
-Each module has a set of responsibilities. Subsystems have specific tasks, packages group several related classes, classes have methods and attributes, and so on. So there is a kind of mapping between modules and responsibilities. This mapping is good when the information which is necessary to fulfill the given task is present in the given module so there is no need to acquire all this information. +
- +
- +
-===== Rationale ===== +
- +
-When this principle is not adhered to, then a module has a responsibility for which it is lacking some information. So in order to fulfill the task the module has to first acquire the needed information by invoking other modules. This increases the dependencies between the modules (which may lead to[[glossary:​ripple effects]]). +
- +
- +
-===== Strategies ===== +
- +
- +
-===== Origin ===== +
- +
-Craig Larman: //Applying UML and Patterns – An Introduction to Object-Oriented Analysis and Design and Iterative Development//​ +
- +
- +
-===== Evidence ===== +
-/* Comment out what is not applicable and explain the rest: */ +
-/* +
-  * [[wiki:​Proposed]] +
-  * [[wiki:​Examined]] +
-  * [[wiki:​Accepted]] +
-  * [[wiki:​Questioned]] +
-*/ +
- +
-===== Relations to Other Principles ===== +
- +
-==== Generalizations ==== +
- +
-  * [[Low Coupling]] Adhering to the information expert principle leads to low coupling as there is less need to communicate with other modules to get the necessary information. +
-  * [[High Cohesion]] Adhering to information expert also means that a module only has responsibilities which belong together. So this increases cohesion. +
- +
-==== Specializations ==== +
- +
-==== Contrary Principles ==== +
- +
-  * [[More Is More Complex]] (MIMC): Adhering to TdA/​IE ​sometimes results in adding further methods. +
-  * [[Principle of Separate Understandability]] (PSU): Assigning responsibilities using TdA/IE bears the danger of violating PSU as responsibilities are assigned based on data availability instead of separate understandability. +
- +
-==== Complementary Principles ​==== +
- +
-  * [[Model Principle]] (MP): TdA/IE tells how to distribute functionality among the natural classes which are created according to the Model Principle. +
- +
-==== Principle Collections ==== +
- +
-{{page>​collections:​OOD Principle Language#​Box}} +
-{{page>​collections:​GRASP#​Box}} +
- +
- +
-===== Example ===== +
- +
- +
-===== Description Status ===== +
-/* Choose one of the following and comment out the rest: */ +
-[[wiki:​Stub]] +
-/​*[[wiki:​Incomplete]]*/​ +
-/​*[[wiki:​Complete]]*/​ +
- +
- +
-===== Further Reading ===== +
- +
-  * [[wp>​GRASP_(object-oriented_design)#​Information_Expert]] +
-  * Andrew Hunt and David Thomas: //​[[http://​www.ccs.neu.edu/​research/​demeter/​related-work/​pragmatic-programmer/​jan_03_enbug.pdf|The Art of Enbugging]]//​+
  
 +~~REDIRECT>​principles:​Tell Don't Ask/​Information Expert~~
principles/information_expert.txt · Last modified: 2013-05-19 22:09 (external edit)