views:

62

answers:

0

My question is based on GWT Tutorial http://code.google.com/webtoolkit/articles/mvp-architecture-2.html

Here we have two pair of view and presenter

In EditContactPresenter we are defining the view interface inside the presenter class

EditContactPresenter implements Presenter{  
  public interface Display {
    HasClickHandlers getSaveButton();
    ....
  }
}

and in case of Contact Presenter we define the presenter interface inside the View class

public interface ContactsView<T> {
  public interface Presenter<T> {
    void onAddButtonClicked();
    .....
  }
}

Why is it so? what this tutorial is trying to communicate by this....?

I am planning to keep presenter interface in separate class (not inside the view) because i may end up making multiple view for the same presenter (mobile / web) and keeping it in one view may not be that maintainable

Second, i am planning of some standardize presenter interfaces on the basic of presentation formats or template, like one which displays the list other which has Form kind of presentation.... so i will not make presenter interface per model class it would be grouped...any suggestion