Intro:
I am using the MVP as a design pattern for a windows form application with some basic CRUD operations.
Requirement
I want to implement an IView interface as an abstract class since it will be used by multiple views, and i can provide some common concrete implementations (like showing dialog boxes with error messages).
Now my IView was implemented in the same project as the Presenter.
Because of this i cannot add any Windows.Forms references out in this project as it violates the MVP pattern.
Proposed Solution:
My solution was to move the IView to a different and new project. Add my win forms references here. This will allow me accomplish the above.
Problem
I am just not sure if this is good design. Am i violating any rules here?
You could declare the view interface in the Presenter project and the abstract base view class in the Views project, like so :
(Presenter project)
(View project)