I've been thinking about how I can apply a more "functional" approach to 
GWT development.

Currently, the view classes change the DOM based on events, for example, 
change the style of this thing, clear and add children to this other thing, 
hide/show another thing. However, what if I could move all the rendering to 
one method (as done in desktop apps). That way I change the state and call 
render (usually this would be deferred thru a refresh() method). The reason 
being is that you can avoid reasoning about state... "How did this widget 
get looking like this?" and have to trace the events leading up that 
situation. Instead you are simply drawing what the current/complete state 
is.

A naiive implementation (in GWT), would be to have a render() method that 
refreshes everything, however, it would also need to "reset" stuff as well, 
when state changes, you'd call render(). Of course, this wouldn't be 
efficient, possibly "flickery". Facebook React works this way, however, 
they calculate the differences in a shadow DOM, and then only write 
differences to the browser DOM, and its very efficient.

Would this kind of approach be feasible in GWT? IMO, it would simplify 
things. 
Thomas weighing in on this would be great.

Joel

-- 
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+unsubscr...@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/groups/opt_out.

Reply via email to