I want to implement an MVP pattern for my application. MVP Passive browsing actually. Therefore, I came to a problem, it was easy, but cannot decide which way I should take, so I want to ask your guru how to work correctly with MVP and display a rich interface.
I mean, let's say we need to display some data, and the client wants it to be a TreeView. There is a requirement: if the user selects another treenode, then the application is updated with new data or something like that. At the moment, I'm not sure how to implement View. (All view logic is passed to the master)
I don’t think it’s a good idea to expose the WinForms class
ISomeForm : IView {
TreeView Host {
get;
}
}
or exposing data models
ISomeForm : IView {
List<MyDataNodes> Items {
get;
set;
}
}
or using other View interfaces.
ISomeForm : IView {
List<IDataView> Items {
get;
set;
}
}
Any suggestions?