Clarifying Understanding of Presenter Interface

16 views
Skip to first unread message

Ari

unread,
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?

-Ari

Hilco Wijbenga

unread,
Oct 31, 2011, 5:31:26 PM10/31/11
to google-we...@googlegroups.com

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.

Jens

unread,
Oct 31, 2011, 7:05:48 PM10/31/11
to google-we...@googlegroups.com
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
Forward
0 new messages