On Sunday, January 15, 2012 11:58:43 AM UTC+1, Qrunk wrote:
>
> Hi, 
>
> I was reading through one of the earlier post and was unable to understand 
> the following lines :
>
>  Gal Dolber  
> Post reply
>  12/07/2010 
>   There no right or wrong way to implement MVP, its just a pattern and 
> you can implement it as you like. The only points I think are important are:
>
>    - (As I already said) The view interface shouldn't have *getters*. 
>    This makes mocking easy peasy.
>    - (Cant I have getSaveButton() in the interface ???)
>
>
What type would it be? If you're thinking about Button, then see below. If 
you're thinking about HasClickHandlers then you'll quickly see what Gal 
meant by "this makes mocking easy peasy": mocking HasXxxHandlers is a PITA, 
you'd better avoid it.
See also 
http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html


>    - *Do not handle Widgets* on the presenter (any widget code makes your 
>    presenter no longer testeable). This means that the methods on the 
>    ViewHandlers shouldn't have widget type parameters
>    - (What does he mean when he says *Do not handle Widgets* on the 
>    presenter )
>    
>
He meant "methods should not have widget types as parameters".

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/315f2qZwzEMJ.
To post to this group, send email to google-web-toolkit@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