Models in View Presenter MVP

Did I think correctly that the “model” represented by M in MVP could be a domain model or a view / view model?

+3
source share
1 answer

Yes, a Model can be essentially any Model. As I see it, the original intention of MVC was that it was a domain object, and that is certainly still possible.

However, my experience has shown that it is better suited if we present the specialized ViewModel / Presentation model as isolation between the domain model and the view.

ViewModel Domain, , , .

, View , , .

  • , , . .
  • , . - CLR Windows Forms, WPF ASP.NET.
  • Validation. . , . , , , .

+7

Source: https://habr.com/ru/post/1727853/


All Articles