> One question .. how does using @UiHandler in the View code maintain
> MVP? I would like to stick to @UiHandler annotation, but it seems to
> me that testing will get hurt. My current thinking is going with
> something similar to what Thomas described above.

I recall having read on the gin list a couple of months ago, that it
might be useful to reverse the dependency of the view and presenter in
MVP. You could inject a "presenter" class into the class containing
the @UiHandler annotations and from the view call methods on the
presenter. I have to figure this out in the next couple of weeks since
I am not yet sure about a lot of things. For instance, does the
presenter need to know about the view class or can it be agnostic by
requiring all data to be passed to its methods? This would remove the
need to have hundreds of *.Display interfaces and would make testing
easier since it would not require that much mocking.

And here is a slightly different question: Does anyone have experience
with how fast the HTMLUnit tests can run? My feeling is, that the plan
for GWT might be to move away from hacks like MVP alltogether. I think
the annotation-style of UI bindings is also well suited to build
automated tests on mock UIs in the future and my feeling is that
sticking close to all of UiBinder's features might not be a bad
idea ...

In case anyone is interested, I could try to pretty up the framework
code we currently use for a large GWT 2 application and perhaps post
it here or soething (I will have to check that with my team though ;))

Cheers, Jonas

--

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


Reply via email to