Hello,
I have a thorough knowledge of GWT MVP with Activities and Places. With Eclipse GPE, I can create GWT MVP view with ease which basically creates Place, View files(UIBinder XML, View interface, UIBInder XML Implementation file), Activity class and reference in ClientFactory to create the view.
I know I have seen this before and not sure how to find it again but I am looking for creating my custom GWT widgets with UIBinder and have MVP capabilities with that. The problem I am facing here is when I create a Composite View using UI Binder I get only "UIBinder XML template" file and the "UIBInder Implementation" file. There is no "Presenter" class available for me. So all my code kind of goes inside that "UIBInder Implementation" file.
Anyone have a suggestion on how to solve this issue? I really want my "custom composite" GWT Widgets (basically doesn't have it's own Place component) to be highly testable and provide clear code separation making my view portion as dumb as possible.
One way I thought was adding manually a Presenter Implementation class myself and creating an View & Presenter interfaces for my "UIBinder Implementation" file just like what we see with GWT MVP View structure eclipse creates but then the question becomes how do I reuse this composite GWT widget in my other views as my presenter won't have the ClientFactory, Event Bus fields needed for any RPC calls. With GWT Activities & Places, AppActivityMapper starts an activity by passing place & Client factory to my activity which in turns references itself to the View. Since there is no Place component for my custom composite View, I have no way to instantiate my Presenter here.
And I don't want my "UIBInder Implementation" file to include RPC calls logic.
Any help would be highly appreciated. What are the best practices here to achieve this.