简体   繁体   中英

How do I know which code can be used in the client side implementation of GWT?

It's my understanding that Google App Engine with Google Web Toolkit has a client side and server side component. The client side gets compiled into JavaScript, while the server side stays as Java code.

How can I know which Java functions/classes I can use on the client side and which must be implemented on the server side due to them not having JavaScript equivalents?

Update: I forgot to mention that I'm also interested in knowing what features of Java I could use. For example, exceptions, generics, class inheritance, etc.

Check JRE Emulation Reference at http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html

There is a list of supported classes.

Google has an article that answers this very question:

Compatibility with the Java Language and Libraries

Compatibility with the Java Language and Libraries describes the differences in syntax and semantics between GWT and the core Java language. It is important to remember that the target language of your GWT application is ultimately JavaScript, so there are some differences between running your application in devlopment mode and production mode (previously known as hosted mode and web mode, respectively).

If you follow their link, it explains in more detail what can and cannot be used in Java (eg exceptions, assertions, multi-threading, etc.).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM