Wednesday, August 29, 2012

RequestFactory architectural question

Hi all,

I've been using GWT for quite a while but just recently started using RequestFactory. Basically it's great but I'm having some questions regarding more complex scenarios then just editing entities in a form. Currently I'm implementing a view in GWT to edit a tree-like object graph: A being root element, A has many B's, B has many C's, both B and C have a position within their parent. It allows drag and drop, inline editing etc and changes should be persisted immediately.

Initially I've implemented the logic to maintain the child positions and to move children between parents on the server, but realized last night that it's pretty hard to keep the EntityProxies on the client in sync with the entities. I've then moved the code updating positions and parents to the client and it works. But from an architectural point of view it seems odd to move all the code from the server to the client, esp. as I would need to re-implement it if it was required on the server.

This morning I was thinking about making the whole view an Editor of the root entity, which sounded initially like a reasonable idea but as I would like to have immediate updates after changes, I would have to invoke edit on the root entity after every update again. As it could be a relatively large object graph, I'd like to avoid re-creating all widgets again and again (it could possibly check on edit whether the currently rendered widgets match the object to edit and optimize a bit that way - seems cumbersome as well)

How do others handle this? Any advises or best practises?


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment