Clarifying Understanding of Presenter Interface

Skip to first unread message


Oct 31, 2011, 1:52:12 PM10/31/11
to Google Web Toolkit
After reading Large scale application development and MVP, I'm a bit
unclear on the Presenter interface and I'd appreciate help in
clarifying my understanding. Specifically I'm unclear as to whether
each Presenter is supposed to have it's own Presenter Interface or is
there supposed to be a universal Presenter interface, which all
Presenters then implement?


Hilco Wijbenga

Oct 31, 2011, 5:31:26 PM10/31/11

In general, you would have a separate presenter interface for each
view. Your views do different things after all so the presenters can't
all be the same.

You could have each presenter extend a parent interface but so far I
have not needed that. That doesn't mean there are no situations where
that might be useful.


Oct 31, 2011, 7:05:48 PM10/31/11
You should definitely read part 2 of the article you have mentioned. It describes the use of MVP in combination with UiBinder. Following part 2 the presenter interface is defined inside the view interface (which means one presenter interface per view if the view provides some user interaction). I found it more intuitive as part 1.

The approach of part 2 also leads to cleaner code.

Reply all
Reply to author
0 new messages