If you search for how to resolve circular dependencies, the answer is almost always "use interfaces". I know how this technique can be used to make a circular dependency work, but I do not understand how that is solving a circular dependency.
Say I have 2 classes View and Presenter which reference each other. Now I apply the "solution" and create the interfaces IView and IPresenter. View does not reference Presenter anymore, but IPresenter; Presenter references IView instead of View.
- I set up View, which needs an IPresenter.
- To get an implementation of IPresenter I need to set up Presenter.
- To set up Presenter, I need an IView.
- To get an implementation of IView, I need to set up View.
The circle has gotten bigger, but it is still there. View and Presenter still depend on each other, just not directly. However, every answer I have seen is absolutely sure that the circular dependency is now resolved. What is my misunderstanding here?