I have been trying out the MVP idea, and these are some points (read,
doubts) I have come up with.

* I do not like the "HasValue<String> suchAndSuchField" interface;
it's too "low level" in my opinion, and harder for testing. I have
been toying with using "String getSuchAndSuchField" and "void
setSuchAndSuchField(String s)", which I think is more "high level",
and allows mocking the view more easily.

* I also think that seting the handlers from the Presenter is also
"low level"; I'd rather have the view set its own handlers, and
communicate with the presenter by means of callbacks. The view needs
implement "void setOnClickedLogin(AsyncCallback cb)" and will use the
callback on its click button handler, or whatever. For example, you
could call the callback both on blur (whenever you exit the password
field) or on clicking the login button; the presenter needs just know
that it's time for validating the login, by using the
"getSuchAndSuchField(...)" calls.

Any opinions, kudos, flames ... ???

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to