According to the Stable Dependencies Principle, the dependency
should be in the direction of the stability
But:
if you don't know what types of changes are likely, it is best to wait and see what happens as the system evolves.
Now:
Say I'm designing a blog, I am tempted to think the stability ranking is:
- Comment - less likely to change
- Post
- User - more likely to change (because it's bigger?)
If I let Comment depend on Post, then Comment will change more likely. But also vice-versa, if I let Post depend on Comment, Post will change more likely, correct?
This wants to be a general argument, every app has a hierarchy similar to users, a main object and children.
Where is my best bet for change? higher level classes or lower level? And why?