According to the Stable Dependencies Principle, the dependency
should be in the direction of the stability
if you don't know what types of changes are likely, it is best to wait and see what happens as the system evolves.
Say I'm designing a blog, I am tempted to think the stability ranking is:
- Comment - less likely to change
- 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?