principles:tell_don_t_ask_information_expert
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:tell_don_t_ask_information_expert [2013-02-25 10:46] – [Caveats] christian | principles:tell_don_t_ask_information_expert [2021-09-02 12:51] – old revision restored (2021-03-28 06:13) 65.21.179.175 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Variants and Alternative Names ===== | ===== Variants and Alternative Names ===== | ||
- | * Information | + | * Expert |
- | * Do It Myself | + | * Do It Myself |
- | * Tell, don't Ask in ((Andrew Hunt and David Thomas: // | + | |
Line 29: | Line 28: | ||
===== Strategies ===== | ===== Strategies ===== | ||
- | |||
- | |||
- | ===== Caveats ===== | ||
- | |||
- | Sometimes assigning responsibilities using IE results in bas solutions (high coupling, low cohesion). This is because IE just focuses on the availability of data. So for example IE would demand domain objects saving themselves to the database. This is bad since it couples the domain objects to the database interface (JDBC, SQL, etc.) and lowers cohesion by adding unrelated responsibilities to the classes. Here it is better to give the task of persisting the domain objects to a separate class.((see Craig Larman: //Applying UML and Patterns – An Introduction to Object-Oriented Analysis and Design and Iterative Development//, | ||
- | |||
- | See also section [[#contrary principles]]. | ||
Line 64: | Line 56: | ||
* [[More Is More Complex]] (MIMC): Adhering to TdA/IE sometimes results in adding further methods. | * [[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 ==== | ==== Complementary Principles ==== | ||
* [[Model Principle]] (MP): TdA/IE tells how to distribute functionality among the natural classes which are created according to the Model Principle. | * [[Model Principle]] (MP): TdA/IE tells how to distribute functionality among the natural classes which are created according to the Model Principle. | ||
- | * [[Information Hiding/ | + | * [[Information Hiding/ |
==== Principle Collections ==== | ==== Principle Collections ==== |
principles/tell_don_t_ask_information_expert.txt · Last modified: 2021-10-18 21:42 by christian