Skip to content

Instantly share code, notes, and snippets.

@struts2spring
Last active July 10, 2019 21:58
Show Gist options
  • Save struts2spring/7595214 to your computer and use it in GitHub Desktop.
Save struts2spring/7595214 to your computer and use it in GitHub Desktop.
GWT interview Questions
public class RemoteServiceServletextends javax.servlet.http.HttpServletimplements SerializationPolicyProvider
The servlet base class for your RPC service implementations that automatically deserializes incoming requests from the client and serializes outgoing responses for client/server RPCs.
public interface AsyncCallbackThe primary interface a caller must implement to receive a response from a remote procedure call. 
If an RPC is successful, then onSuccess(Object) is called, otherwise onFailure(Throwable) is called. 
Each callable asynchronous method corresponds to a method in the correlated service interface. The asynchronous method always takes an AsyncCallback as its last parameter, where T is the return type of the correlated synchronous method. 
A call with a typical use of AsyncCallback might look like this: 
service.getShapes(dbName, new AsyncCallback() {
public void onSuccess(Shape[] result) {
// It's always safe to downcast to the known return type. 
controller.processShapes(result);
}
public void onFailure(Throwable caught) {
// Convenient way to find out which exception was thrown.
try {
throw caught;
} catch (IncompatibleRemoteServiceException e) {
// this client is not compatible with the server; cleanup and refresh the 
// browser
} catch (InvocationException e) {
// the call didn't complete cleanly
} catch (ShapeException e) {
// one of the 'throws' from the original method
} catch (DbException e) {
// one of the 'throws' from the original method
} catch (Throwable e) {
// last resort -- a very unexpected exception
}
}
});
1. What are some advantages for the Model-View-Presenter pattern?
2. How can you test a GWT application?
3. Describe what a GWT generator does
4. What are some benefits of using CssResource, ImageResource, TextResource, etc.
5. Serialization and Un-serialization. What is required of a user defined class for it to be serializable?
6. Event handling. Describe how an event bus is used and implemented.
7. Describe how one module can inherit or use members from another GWT module.
8. What are the different listeners in GWT ?
Here is the list of listeners HistoryListener,Changes to Browser History,WindowCloseListener,WindowResizeListener,ChangeListener,ClickListener, FormHandler,FocusListener,KeyBoardListener,LoadListener,MouseListener,PopupListener,
ScrollListener,TableListener,TabListener,TreeListener 
9. What is AsyncCallback Interface?
10. What is GWT Sever Side RemoteServiceServlet?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment