I have a UI form written using model-view-presenter that has, among other things, a listbox containing a number of different domain objects. The form also contains an add/update button which pulls up a dialog allowing the user to add/update a domain object.
The domain-object form is general and is used to gather basic information, like the name of the object. It's essentially a humble dialog that collects information and dispatches an event with said information when the form is closed successfully allowing the domain object to be added or updated accordingly.
To clarify a bit more, I'm unsure in a number of different areas:
- Is there a standard interaction model or are there standard interaction patterns for use between UIs when using MVP?
- Should the responsibility for displaying any required forms or dialogs lie with the presenter, view, or neither?
- Does the fact that I'm using a humble dialog for the information gathering violate "tell, don't ask" and make things harder than needed?
- Is the answer UI specific and, if so, what questions would guide me to a good answer?
Other notes:
- It feels like the responsibility for displaying required forms and dialogs lies more with the view than with the presenter, as other views could use alternative means to gather that information -- the presenter only needs be appropriately alerted.
- I'm more interested in the related patterns and practices than in technical details.
- In the spirit of low coupling, I typically use message passing between forms and components.