I am also using the MVP approach described in "Large scale application development and MVP - Part II".
It is really nice to have a delegate interface that is known to the view and is used to delegate UI events to methods. The view can then use UiBinder's @UiHandler and can also do simple logic before calling a method on that delegate interface (Part 2 calls this delegate interface presenter). This simple logic may be something like "If the user clicks on the 'add date' button then the date textbox should not be empty and contain a valid date, otherwise show a Window.alert message" or something like "If the user checks this checkbox then disable textbox x, y and z". Its really annoying to have these kind of simple checks inside a presenter that already contains the heavy logic and service calls. That way there is nearly no need for lots of methods that return HasXxxHandlers, etc interfaces and you do not have lots of anonymous classes just to bind your presenter to the view. The "GWT MVP" with Activities and Places is more a History Management Framework so you can use the browsers back/next buttons and to make states of your app bookmarkable. So you could use "GWT MVP" along with the MVP pattern described in "Large scale application development and MVP - Part II" or with any other MVP pattern. So I would choose: - GWT MVP, if you want your app states bookmarkable (along with back/next browser button support) - MVP Part 2, if you use UiBinder and you do not want lots of HasXxxHandlers methods in your view and anonymous classes in your presenter (and you like the idea of pushing some logic into the view) - Editor Framework, if your app often edits data and you want to reduce the amount of code you need to copy data from model objects into the view and then back to the model. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
