When implementing the MVP pattern in winforms, I often find bloated view interfaces with too many properties, setters and getters. A simple example would be a view with 3 buttons and 7 text fields, all of which have values, allowed, and visible properties displayed in the view. Adding test results for this, and you can easily get an interface with 40ish properties. Using a view model, there will be a model with the same number of properties.
How do you easily synchronize presentation and presentation model without bloated presenter logic that passes all values back and forth? (With this 80ish presentation encoder, imagine a test presenter mocking a model and presentation would look like this: 1.60ish lines of code to just simulate this transmission.) Is there any infrastructure to handle this without resorting to winforms data binding? (you can use different views than winforms view. According to some, this synchronization should be the task of the speakers ..) Could you use AutoMapper?
I may be asking the wrong questions, but it seems to me that MVP is easily bloated without any good solution here.
source share