It may be that you already know this but,
the very important attitude to acquire before starting to use GWT is

- GWT is not Java runtime, GWT is Javascript runtime
- All GWT Java code is compiled to Javascript runtime
- GWT is compiled to run on the browser client
- Any Java code hoping to be used for GWT must implement Serializable.
- Therefore, any Java lib called by your code must have their source
code available to the GWT compiler to translate into Javascript.
- Consequently, any lib called by a lib called a lib ... called by a
lib has to have its source code available to the GWT compiler. If the
Java source dependency is broken at any point due to unavailable
source code, your GWT compilation will fail.
- Your Java source code dependency chain can be broken by your Java
lib calling a library that does not implement Serializable, or calling
a library written in another language.


You seem to be confusing between the Java code in GWT and Java code
for JVM.
GData libs and UserService runs only on the JVM and do not run on the
browser.

The last time I used GData, I wrote the Java code calling GData libs
to run only on the server.
I used GWT RPC for the GWT client to call the server-side to trigger
GData calls, and after that, the server passes the results of the
calls to the RPC callback of the GWT client.

Similarly for GAE userservice - there is no Java source code available
for UserService. If your GWT app needs to call UserService, you need
to call UserService on the server only and pass any UserService info
as serialized structures to the GWT RPC client callback.

To effectively use GWT in client-server mode, you should familiarise
on how to exploit GWT RPC. Attitude-wise, always treat GWT client Java
code as though it is written in a language other than Java to avoid
confusing between JVM Java and GWT Java. You cannot willy-nilly lift
off any Java code and bind them to your GWT Java code. (Defn of willy-
nilly: taking actions by random will without considering their
implications/complications).

This is an 8-part series I blogged about combining GAE, GWT and GDATA:
http://h2g2java.blessedgeek.com/2009/08/tablemgr-gae-gwt-gdata-with-rpc.html.
Note the requirement for @gwt.TypeArgs is no longer true for GWT 1.7
onwards.

Modifying send greeting RPC example to use Uibinder:
http://h2g2java.blessedgeek.com/2010/02/tutorial-gwt-rpc-stub-modified-with.html.

Using GAE UserService with GWT:
http://h2g2java.blessedgeek.com/2010/05/accessing-google-userservice-from-gwt.html.

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

Reply via email to