user
pass
remember me
 
sup yo
2011-10-16 07:07
Test Fubar
2011-09-27 00:27
tralala
2011-09-08 15:24
Example Title
2011-09-01 05:48
Wiki
2011-09-01 05:47
 
Html 5 Tutorial
2009-08-07 18:25
 
admin about Draft?
2011-03-27 04:20
admin about Title
2010-08-16 00:37
unknown about teste
2010-06-23 21:30
 
from admin admin on 2009-11-15 11:38
bad good

Pattern description

Model-view-presenter is a user interface design pattern engineered to facilitate automated unit testing and improve the separation of concerns in presentation logic.

  • The model is an interface defining the data to be displayed or otherwise acted upon in the user interface.
  • The view is an interface that displays data (the model) and routes user commands to the presenter to act upon that data.
  • The presenter acts upon the model and the view. It retrieves data from repositories, persists it, manipulates it, and determines how it will be displayed in the view.

Normally, the view implementation instantiates the concrete presenter object, providing a reference to itself. The following C# code demonstrates a simple view constructor, where ConcreteDomainPresenter implements the IDomainPresenter interface:

public class DomainView: IDomainView
{
private IDomainPresenter mDomainPresenter;

public DomainView()
{
this.mDomainPresenter = new ConcreteDomainPresenter(this);
}
}

The degree of logic permitted in the view varies among different implementations.