Is there a recommended way to use the Observer pattern in MVP using GWT?

Posted by Tomislav Nakic-Alfirevic on Stack Overflow See other posts from Stack Overflow or by Tomislav Nakic-Alfirevic
Published on 2010-05-14T08:30:01Z Indexed on 2010/05/14 8:34 UTC
Read the original article Hit count: 320

Filed under:
|
|
|

I am thinking about implementing a user interface according to the MVP pattern using GWT, but have doubts about how to proceed.

These are (some of) my goals: - the presenter knows nothing about the UI technology (i.e. uses nothing from com.google.*) - the view knows nothing about the model or the presenter - the model knows nothing of the view or the presenter (...obviously)

I would place an interface between the view and the presenter and use the Observer pattern to decouple the two: the view generates events and the presenter gets notified.

What confuses me is that java.util.Observer and java.util.Observable are not supported in GWT. This suggests that what I'm doing is not the recommended way to do it, as far as GWT is concerned, which leads me to my questions: what is the recommended way to implement MVP using GWT, specifically with the above goals in mind? How would you do it?

© Stack Overflow or respective owner

Related posts about gwt

Related posts about java