I recently tried out the new cell-widgets in GWT2.1 and I'm planning
to replace my homegrown solutions with these. However I came across a
problem: All the examples, e.g. the "Expenses"-App, that use these
widgets use them within a Composite which at the same time implements
"Activity", apparently being Presenter and View at the same time. So I
was wondering would be the best approach to separate out those two
aspects?

One obvious problem is the Cell-subclass itself, whose render-method
usually depends on the model object. If it's as simple as making a
"getName()" call to the model object, that is fine with me, although
it technically violates the MVP-pattern. But if there are calculations
necessary for providing the cell content, e.g. calculating percentages
to visualize a value with a bar-chart in a table cell, it would be
better to do that in a separate presenter that can be tested. Should I
use a Delegate interface in the View for that, that the Activity/
Presenter implements so the calculations can be done there?

Are there any examples of using these widgets in a traditional MVP
environment? The "Large scale application development and MVP - Part
II" uses generics to hide the actual the model classes from the view,
would it be sensible to do the same thing when using the Cell-Widgets?
It seems possible, but from the current design of the Cell-Widgets and
the provided examples I get the feeling, that they are not really
meant to be used in that way.

Regards,
Tobias

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to