1. Explain how GWT Navigation works?

In GWT we can handle page navigation using couple of ways.
1. Using History tokens
2. Clearing the content panel and load the new page in the content panel.

2. Explain what is the purpose of the IsSerializable interface in GWT?

A user-defined class is serializable if all of the following apply:

It is assignable to IsSerializable or Serializable, either because it directly implements one of these interfaces or because it derives from a superclass that does
All non-final, non-transient instance fields are themselves serializable, and
As of GWT 1.5, it must have a default (zero argument) constructor (with any access modifier) or no constructor at all.

One key difference though is that , for security reasons, all Serializable classes must be included in a serialization policy, which is generated at compile time, while IsSerializable classes do not have that requirement.

If your interest is purely in GWT, and you don't e.g. share your model classes between the web application and another application, I suggest you have your model classes/DTOs implement IsSerializable.

3. Do you know how to use RequestBuilder?

To use RequestBuilder we need to inherit HTTP Module in module.xml file
<inherits name="com.google.gwt.http.HTTP"/>

4. Explain how are we going to get the response from server side?

For this purpose only GWT has one Asynchronous interface which has one parameter called AsyncCallBack, using this callback object it will call the client side code once the server completed the execution.
So basically all the calls to server side method will have two call back methods
onSuccess()
onFailure()

If the server side method executed properly then onSuccess() method will be called otherwise onFailure() method will be called, so based on this we can proceed with our functionality.

5. Tell me how to work with Server side communication?

Using GWT RPC
To user GWT RPC we need to create couple of interfaces and one implementation class.
1. Synchronous interface
2. Asynchronous interface
3. Implementation class implements Synchronous interface.

6. Explain what is Bootstrap process in GWT or How an applications loads in GWT?

HTML
|
nocache.js ( Bootstrap javascript file )
|
|->( Loads the browser specific files)
|
module.xml ( *.gwt.xml )
|
|->( which loads the entry point class )
|
onModuleLoad() method
|
|
|
Loads the application

7. Explain what is GWT - Java Emulation library?

Google Web Toolkit includes a library that emulates a subset of the Java run-time library. The list below shows the set of JRE packages, types and methods that GWT can translate automatically. Note that in some cases, only a subset of methods is supported for a given type.

java.lang
java.lang.annotation
java.math
java.io
java.sql
java.util
java.util.logging

8. Tell me Is GWT works in all the browsers?

Yes GWT works in all the browsers because GWT compiler creates javascript code per browser and per localization.

I meant, if you configure module.xml with Firefox and IE then GWT compiler will create javascript code for both browsers seperately.

And when you load the application it first check from which browser you are opening the application and it will load the corresponding javascript.

It means GWT supports Cross browser functionality.

9. What is GWT Compiler?

GWT Compiler used to convert the client side Java code to Javascript at the time of building the source files.

10. Explain the disadvantages of GWT?

Problems with indexing by search engines - IMHO, this should be the biggest disadvantage of using GWT, or pure JS web applications in general. Since the content, layout, everything is created "on-the-fly" with JS, the search engine will only see a very short HTML page and that's that - you have to take care of this somehow yourself (for example, using cloaking). Google has finally started to work on a solution for this, however it doesn't seem to attractive to me.
Update: Google has finally addressed this problem. However, I'll leave this as a trade-off because making the application crawable still requires more effort than in other frameworks. At least now we have a "standard" to follow and don't have to use some dubious techniques (like cloaking).

Need lot of memory to run it in dev mode.
High compile time.
Every server call will be ajax.
You will loose control on your javascript.

Download Interview PDF