Tuesday, February 26, 2013

Re: New widgets: Best way to implement them?

Just adding few thoughts.

Personally I think that, performance wise, cells are the best. But it is also true that they can be tricky to work with, when defining new widgets.
Luckily CellWidget helps *a lot* this way. Using CellWidget + Appearance pattern [1] + maybe UiRenderer, let you code widgets using UiBinder with a swappable/device-aware UI that are (supposed to be) a bit faster than the traditional "extends Widget/Composite + UiBinder" way of defining widgets. Sencha gxt 3 uses extensively the so called "cell + appearance" pattern, with good results over the previous implementation [2].

I see the IsRenderable strategy simply as an added value, a plus, when using a RenderablePanel as root widget of others composites. I guess it is not (actually) usable with CellWidget (by reading [3]), but in a future it may well be. Such strategy can also potentially open the doors to some sort of server-side widget rendering, using the server-side part of the already available ElementBuilder API (see [4]).

As a side note, interesting are the choices made in Collide: low-level mvp-based widgets built upon the Element object coming from the Elemental library, with some added custom listeners, as necessary [5].

[1] http://code.google.com/p/google-web-toolkit/wiki/CellBackedWIdgets
[2] http://www.sencha.com/products/gxt/whats-new-in-sencha-gxt-3/
[3] https://groups.google.com/d/topic/google-web-toolkit-contributors/g8WPRxkdqPA/discussion
[4] https://groups.google.com/d/topic/google-web-toolkit/neeh5YxKm-I/discussion
[5] http://code.google.com/p/collide/source/browse/#git%2Fjava%2Fcom%2Fgoogle%2Fcollide%2Fclient%2Fui

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment