I have written a MVP project where the View is a WinForm that implements my IView interface. I am in the process of reviewing the code, improving it where I can and would like to ask your thoughts regarding how the view and presenter interact. Which of the following is best practice in your opinion?
- Expose methods of the presenter class for the view to use. (i.e make them public).
- Have the presenter listen to events raised by the View class.
For example, my MVP uses a service that communicates via a serialport. To connect to the remote device my view calls the public Presenter method Connect() which then calls the appropriate service methods.
Would it be better practice to raise a Connect() event and have the presenter listen for it?