ArcBees/GWTP-Samples — pull request #36 by christiangoudreau (2013-02-18 04:11:05+00:00)
Title: Updated sample to use the new form factor generator

To bind presenters depending on the form factor, you can use an abstract presenter base class like this:
```java
public abstract class AbstractApplicationPresenter
extends Presenter {
@ProxyCodeSplit
@NameToken(NameTokens.homePage)
@Title("Home")
public interface MyProxy extends ProxyPlace {
}

public interface MyView extends View, HasUiHandlers {
}

public AbstractApplicationPresenter(
EventBus eventBus,
MyView view,
MyProxy proxy,
GwtEvent.Type> slot) {
super(eventBus, view, proxy, slot);
}
}
```

then bind in your modules:
```java
bind(ApplicationDesktopPresenter.class).in(Singleton.class);
bind(ApplicationDesktopView.class).in(Singleton.class);
bind(AbstractApplicationPresenter.MyProxy.class).asEagerSingleton();
bind(AbstractApplicationPresenter.MyView.class).to(ApplicationDesktopView.class);
bind(AbstractApplicationPresenter.class).to(ApplicationDesktopPresenter.class);
```

There's no helper methods for that. The preferred approach would be to apply SRP and instead use a collaborator for platform specific behavior.