Is GWT's RPC different from AJAX?
Asked Answered
S

1

9

How is GWT (Google Web Toolkit)'s RPC (Remote Procedure Call)'s for Asynchronous operations from browser/javascript to server is DIFFERENT or SIMILAR when compared to the AJAX calls ?

If they are different, could someone help me understand how they are different ?

I also heard that this RPC implementation does not works with all Server containers. For example, the GWT project did not work in Apache Tomcat.

Moreover, is this RPC a an custom implementation of Google , or is it a standard implementation ?

Scorpaenoid answered 6/12, 2012 at 1:37 Comment(1)
It used AJAX under the hood. Requests and responses are serialized and deserialized on the server and client sides.Pyoid
S
11

1) GWT RPC uses AJAX to allow Data transfer for GWT applications.

2) GWT RPC abstracts out lot of information and wraps ajax to allow you to code in JAVA without worrying about different browsers.

3) It WORKS in tomcat, jetty and in every server container. In some cases people misconfigure the paths ( dev mode vs production mode causes confusion in image paths/ css)

4) RPC is indeed a CUSTOM implementation from Google.

Salbu answered 6/12, 2012 at 3:50 Comment(5)
Put differently: HTTP is the transport, AJAX (XMLHttpRequest actually) is the low-level API, and GWT-RPC is a high-level API and data-format (protocol) on top of them.Asturias
Thank you @Sachin Shekhar and Thomas Broyer , one of our developers seemed to have tried in Tomcat and faced issue (not yet aware of the exact issue & error). Since our Development & Production environment are Websphere 7.1 , i was wondering if Google's implementation of RPC (i.e. the java code generated for the purpose of communication between client javascript code and server java code, will it work in all jdk Server containers). could someone throw some light on this aspectScorpaenoid
Can you share the relevant log snippet?Salbu
sure.. and also, would GWT require us to include any Library/JARs to be included along with the WAR/EAR of the application during runtime ?Scorpaenoid
Yes. gwt-servlet.jar is minimum requirement. There are bunch of other jars like request-factory-server.jar which are to be included if you use some specific gwt features.Salbu

© 2022 - 2024 — McMap. All rights reserved.