Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThis answer does not say why DIP is important, or even what DIP is. I have read the official DIP document, and think this is really a poor and unjustified "principle", because it's based on a flawed assumption: that high-level modules are reusable.
      singulars
    2. COConsider a dependancy graph for some objects. Apply DIP to the objects. Now any object will be indpendent of the implementation of the other objects. Unit testing is now simple. Later refactoring for reuse is possible. Design changes have very limited change scopes. Design problems don not cascade. See also the AI pattern "Blackboard" for data dependaecy inversion. Together, very powerful tools fo making the software understandable, maintainable and reliable. Ignore dependency injection in this context. It is unrelated.
      singulars
    3. COA class A using a class B does not mean A "depends" on the implementation of B; it depends on the public interface of B only. Adding a separate abstraction on which both A and B now depend only means that A will no longer have a compile-time dependency on the public interface of B. Isolation between units can be achieved easily without these extra abstractions; there are specific mocking tools for that, in Java and .NET, that deal with all situations (static methods, constructors, etc.). Applying DIP tends to make software more complex and less maintainable, and no more testable.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload