Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add thoughts on DIP #16

Open
klaeufer opened this issue Oct 23, 2021 · 0 comments
Open

add thoughts on DIP #16

klaeufer opened this issue Oct 23, 2021 · 0 comments
Assignees

Comments

@klaeufer
Copy link
Member

https://en.wikipedia.org/wiki/Dependency_inversion_principle <- good reference
The key points of the principle are

  • High-level modules should not import anything from low-level modules. Both should depend on abstractions (e.g., interfaces).
  • Abstractions should not depend on details. Details (concrete implementations) should depend on abstractions.

Let's try to map these points to an example, such as LineCountImperativeModular together with the common traits. Which of those traits and objects are

  • high-level modules
  • low-level modules
  • abstractions
  • details

?

Or perhaps we could arrange the traits along a high-level vs. low-level continuum.
It would be great if some of you followed up here so we can have a discussion!

@klaeufer klaeufer self-assigned this Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant