AFAICT, the differences between UiRenderer and UiBinder are that:
- widgets are not supported
- there's no "owner class", which changes a few things:
- <ui:with> fields are provided by method arguments rather than @UiField(provided=true)
- ui:field's are returned using getters rather than @UiField fields in the owner class
- UiRenderer handles event dispatching to "elements" (event delegation, then matching the actual target). Event dispatching is done by passing a "handler class" (similar to the owner class of UiBinder here), the NativeEvent and the root element where you rendered the UiRenderer; @UiHandler methods are matched on the "handler class" rather than the "owner class" for UiBinder. In addition, you can pass additional parameters that will be passed back to the @UiHandler methods.
Thanks for this valuable clear separation.
But UiRenderer and UiBinder are built on the same grounds.
Yes I know that since I patched the UiBinder module, I was saying that from a user point of view, uses are very distinct. A user clearly prefers using widgets where he wants, and avoids as possible Templates which are mainly for performance critical points (like cells). That's why I suggested that when someone reads the doc, he will be 80% interested in UiBinder, 10% in resources, client bundle and <ui:with> technics, and if that doesn't suffice, or only in specific needs he will want to read UiRenderer, typically, if he's in UiRenderer he already knows well (or should) UiBinder.
Anyway that's my point of view, I'm sharing it because I know that from the inside we always see things differently. (and for me the external insight is always welcome)
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment