Why state cannot be part of Presenter in MVP?

Posted by rFactor on Stack Overflow See other posts from Stack Overflow or by rFactor
Published on 2011-06-23T15:35:27Z Indexed on 2011/06/30 8:22 UTC
Read the original article Hit count: 260

Filed under:
|
|
|
|

I read http://www.codeproject.com/KB/architecture/MVC_MVP_MVVM_design.aspx and it said:

As powerful as they are, both MVC and MVP have their problems. One of them is persistence of the View’s state. For instance, if the Model, being a domain object, does not know anything about the UI, and the View does not implement any business logic, then where would we store the state of the View’s elements such as selected items? Fowler comes up with a solution in the form of a Presentation Model pattern.

I wonder why Presenter can't hold View state? It already holds all View logic.

As far as I understand, in MVC and MVP the state is kept in View. In PM and MVVM the state is kept in the Presentation Model. Why can't Presenter follow PM in this particular case and contain the state of the view?

Here is another article which says Presenter does not hold View state, instead the view does: http://www.codeproject.com/KB/aspnet/ArchitectureComparison.aspx

© Stack Overflow or respective owner

Related posts about design

Related posts about architecture