User Tools

Site Tools


principles:tell_don_t_ask_information_expert

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:tell_don_t_ask_information_expert [2013-09-06 15:10] – [Description] TdA == IE christianprinciples:tell_don_t_ask_information_expert [2014-10-09 12:27] – [Caveats] Typo 157.193.8.23
Line 49: Line 49:
 ===== Caveats ===== ===== 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//, p. 298))+Sometimes assigning responsibilities using IE results in bad 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//, p. 298))
  
 See also section [[#contrary principles]]. See also section [[#contrary principles]].
principles/tell_don_t_ask_information_expert.txt · Last modified: 2021-10-18 21:42 by christian