1

I am trying to understands MVP using Winforms.

I found this example. Why do UserModel and UserView need to implement the IUserModel and IUserView interfaces ?

3

Interfaces are required in good quality implementations of MVP for the same reason they are required in all good "OO" designs:

  1. They help reduce coupling
  2. They discourage inheritance (which further reduces coupling)
  3. Arguably most importantly, they simplify unit test writing
  • 1
    In some languages they're also your only option for multiple inheritance e.g. C# – Robbie Dee Jan 27 '16 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.