I prefer MVP part 2 as well. It lets me leverage @UiHandler in my uib
views thus further reducing boilerplate code in the presenter. I
found that GIN is essential to its success esp if you are considering
Junit testing without a web container. Others essentials are Mockito
and Jukito
Here's an example of how I've followed mvp part 2:
SampleUIB .java...
public class SampleUIB extends Composite implements SampleView
SampleView.java..
public interface SampleView{
public interface Presenter {
void buttonPressed(String fieldValue);
}
void loadData....);
}
SamplePresenter.java..
public class SamplePresenter implements SampleView.Presenter {..
@Inject private SampleRpcAsync sampleService;
@Inject private private Table3View view;
-david
The solution is to move to the "part 2" article and follow the advice
here:
> do not use HasXxxHandlers/HasValue/etc. interfaces but make up your own
> Presenter interface, single point of interaction from the view to the
> presenter (the view then pushes to the presenter, rather than the presenter
> pulling from the view).
> Have a look athttp://
www.google.com/events/io/2010/sessions/gwt-continuous-build-te...too