On 17 nov, 08:59, zixzigma <zixzi...@gmail.com> wrote:
> Hello everyone.
>
> What are the benefits of using RequestFactory over JSON/Request
> Builder.
>
> to implement client-side communication/persistence i have to options:
>
> 1- using Spring/Spring MVC on the server to handle all the server-side
> work,
> and send JSON data to the GWT client.
>
> 2- i believe I still can use SpringMVC with RequestFactory, though not
> as cleanly seperated as the first approach.
>
> all the code will be in Java.
>
> What are the benefits of using RequestFactory over JSON/
> RequestBuilder ?

 - serialization/deserialization code is generated for you
 - partial objects (you ask for the properties you need using .with()
and only those goes to the wire)
 - AFAICT, the immutable object is shared across responses (and
updated as responses come back from the server)
 - events (dispatch on an EventBus) about objects having been
persisted/updated/deleted on the server (as side-effects of requests
from that one client –no broadcast– *and* the
RequestFactoryEditorDriver listens to them to automatically update the
display)
 - built-in JSR303 validation (after deserialization but before
invoking the "operation" on the server-side) sending back results as
Violations on the client-side (*and* you can ask the
RequestFactoryEditorDriver to display those violations, which is not
possible with the SimpleBeanEditorDriver, see issue 5567)

Of course, there are limitations too and, as always, some of the
benefits listed above come with drawbacks.

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

Reply via email to