Wikipedia:Reference desk/Archives/Computing/2017 October 16
Appearance
Computing desk | ||
---|---|---|
< October 15 | << Sep | October | Nov >> | October 17 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
October 16
[edit]How will you describe the "presenter" in the model-view-presenter?
[edit]If the Controller is the user and it's activity manipulating the model via the view, what is the "presenter"? What will be you most short, summary (in say 8-10 words) for this term "presenter"? Thank you, Ben-Yeudith (talk) 06:36, 16 October 2017 (UTC)
- We have articles on both Model–view–presenter and Model–view–controller.
- The Presenter performs the same role as the Controller. The difference is really in the relationship between the View and Model in the two overall patterns. With MVC the Controller performs the "change" actions from the user upon the model, and the "display" actions are performed by the model and the view together, without the controller. This "loop" arrangement makes it harder to slice the pattern into layers, either for easier component testing or for highly laminated platforms, such as the web.
- The Presenter, in contrast, forms the interface (and the only interface) between Model and View for both display and change actions. This makes the overall system easier to break down for testing and for deployment onto the web (Views can often be on the web client these days, with connectivity by JSON rather than HTML). The Model and View are both easy to implement and test too (but they were in MVC too). The downside of MVP is that he "Presenter" is often (usually?) poorly designed and instead becomes an instance of the Magic pushbutton or God object anti-patterns, where the whole functionality that ought to be in Model or View ends up in the Presenter instead. Andy Dingley (talk) 10:58, 16 October 2017 (UTC)