Wednesday, May 23, 2012

Re: GWT (lazy) Widget rendering: Comparison of approaches


On Wednesday, May 16, 2012 4:03:40 PM UTC+2, Chris Lercher wrote:
There are several competing (or complemental) new/experimental (or deprecated) classes around, which deal with rendering Widgets in alternative (often lazy) ways in GWT:

- GXT2's lazy Component (which has been deprecated in GXT3)
- PotentialElement ["experimental"]
- IsRenderable ["very experimental"] and RenderablePanel ["experimental"]

Seeing how GXT2 had problems with their lazy rendering, what can we expect from these concepts? Looking into trunk, IsRenderable seems to evolve (using a new RenderableStamper class), so there's probably something in the pipeline...

I know, that this is not a concrete question - I'm just curious if someone has interesting information about this subject?

AFAICT, PotentialElement and IsRenderable are to speed-up rendering of widgets, particularly when used within an HTMLPanel or RenderablePanel in a UiBinder template: the widget is "rendered" to SafeHtml (and stamped), concatenated to the HTML of the containing HTMLPanel and "rendered" as a single big HTML string, then the stamped element is retrieved out of the HTMLPanel and the widget is "attached" to it (claimElement) and finally "logically attached" to the HTMLPanel (as its parent widget).
I suppose they could also be used to attach widgets to some HTML generated (pre-rendered) on the server-side (similar to Closure's decorate(), and the various static wrap() methods used in "basic" GWT widgets; there's no notion of canDecorate() as in Closure though, so it'd be your responsibility to build this into your widgets; not really for reusable widgets, more for applications you control from end-to-end).

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

No comments:

Post a Comment