I've now seen that the MVP pattern is actually very similiar to the MV(VM) pattern.
But i don't really understand the difference. I have, in my applications a basic view that declares all GUI-elements, and special aspects of the GUI, like columns resizable or not in a table. Thats mostly for the designer to build everything out.
Now i write my domain models.
Then i go on and have a concrete view that inherits the formerly created view and sets up databinding, validation, actions etc. handled by the presentation model.
The presentation model is always connected to one specific domain model.
So now i have:
Abstract view (mostly for the designer)
^
|
View -> Presentation model -> Domain Model
Besides the presentation, there are validators etc. but all incorporated with the presentation.
Now i can test against the presentation, the domain or the concrete views.
Also, i can bind multiple presentation models against one view, or one presentation model against multiple views.
But i don't really understand the difference. I have, in my applications a basic view that declares all GUI-elements, and special aspects of the GUI, like columns resizable or not in a table. Thats mostly for the designer to build everything out.
Now i write my domain models.
Then i go on and have a concrete view that inherits the formerly created view and sets up databinding, validation, actions etc. handled by the presentation model.
The presentation model is always connected to one specific domain model.
So now i have:
Abstract view (mostly for the designer)
^
|
View -> Presentation model -> Domain Model
Besides the presentation, there are validators etc. but all incorporated with the presentation.
Now i can test against the presentation, the domain or the concrete views.
Also, i can bind multiple presentation models against one view, or one presentation model against multiple views.
But i don't call that MV(VM) but MVP.