> > I would definitely prefer starting from zero without IE 6-8 in mind 
> > for new widgets. 
>
> With new widgets, definitely agree, I just think that's orthogonal to 
> adding interfaces for the existing widgets. 
>

Yep, agreed.

 

> > So what would be the added benefit in terms of MVP? 
>
> In the Type 1 style of MVP, the view interface exposes widgets directly 
> to the presenter, albeit via the HasXxx characteristic interfaces. This 
> can get annoying if you need multiple characteristics exposed for a 
> single widget, or need to call a method that is not in a HasXxx 
> interface. 
>

Yeah this Type 1 style is really PITA in the long term, especially if views 
are a bit more complex. Its not just about exposing multiple 
characteristics of a single widget, its also about finding good names for 
these methods. I always had trouble with it. IMHO 
getPersonName().setValue() looks strange and anything else looks even 
stranger. Personally, I was never really pleased with this solution.

However, with the release of UiBinder we constantly tell people/recommend 
to use the Type 2 style of MVP with UiBinder + @UiHandler and a delegate 
interface if they ask for MVP in gwt-discuss. So I think this argument 
looses some weight as probably no one really wants to do the type 1 way 
anymore and only a minority still choose it for new projects.

So my concern is that nowadays developers that use MVP just dont need these 
interfaces anymore that badly. But these interfaces are probably nice to 
have for testing small widgets that self-contain their limited logic. You 
can then just cancel out Composite.initWidget() by overriding it during 
testing and then mock all fields. No need for GWTMockUtilities.disarm() or 
gwtmockito then.

-- J.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to