GWT Interview Question
1) What is GWT?
Google Web Toolkit (GWT) is a development toolkit for building ajax application using Java. GWT insist on reusable approaches to common web-app tasks such as bookmarking, UI abstraction, cross-browser portability, etc.
GWT provides two modes:
2) What are the components of GWT?
3) What is a module descriptor in GWT?
A module descriptor is a configuration file used to set-up a GWT application. Its file extension is *.gwt.xml, where * is the name of the application and this file should reside in the project's root.
4) What is a GWT module?
A GWT module is simply an encapsulation of functionality. It shares some similarities with a Java package but is not similar.
5) How do I enable assertions?
6) What is the default style name of any GWT widget?
By default, the class name for each component is gwt-. For example, the Button widget has a default style of gwt-Button, and similar way TextBox widget has a default style of gwt-TextBox.
7) What is internationalization?
Internationalization is changing the language of the text based on the locale. For example, the browser should display the website content in Hindi for a user sitting in India and French for the user accessing the website from France.
8) What is the purpose of Host Page?
The most important public resource is host page which is used to invoke actual GWT application. A typical HTML host page for an application might not include any visible HTML body content at all, but it is always expected to include GWT application via a <script.../> tag.
9) What is RPC?
RPC (Remote Procedure Call) helps in client communication with the server. RPC is a process of calling a method from a class; however, in this process, the only difference is that the class is located on a server but not the part of the client program.
10) What is GWT ClientBundle?
The ClientBundle interface moves entries from the everything-else category into the cache-forever category.
11) What are the types of panels in GWT?
12) What are the Layout Panels?
Layout Panels can contain other widgets. These panels control the way widget is displayed on User Interface. Every Panel widget inherits properties from Panel class which in turn inherits properties from Widget class and which in turn inherits properties from UIObject class.
13) Define GWT JSON?
14) Define Parsing in GWT XML?
To parse the XML, we have to first parse the raw XML text into XML DOM structure. DOM structure helps in the navigation of the data. XML parser is located under XMLParser class. XMLParser class consists of parse(String) static method which is called to parse the XML and return a Document object.
15) Give the nodes created by XML parsing.
16) Enlist the dependencies required for database in GWT
Common: hsqldb, Common-lang , log4j .
JDO: datanucleus, showfiles, jdo.
17) Define GWT History Mechanism.
History mechanism is similar to the Ajax history implementations such as RSH (Really Simple History). The Basic idea is to track the internal application state in the URL fragment identifier. Main advantages of this mechanism are:
18) Define GWT History Tokens.
A token is simply a string that the application can parse to return to a particular state. This token will be saved in browser history as a URL fragment (in the location bar, after the "#"), and this fragment is passed back to the application when the user goes back or forward in history or follows a link.
19) How to create the custom widget?
Google Web Toolkit offers a variety of ways for creating the custom widgets. The easiest way is to develop composite widgets by grouping existing basic widgets and adding some interaction logic to them.
To create a Custom Widget, it has three general concepts which are as follows:
20) What is JSNI?
21) What are the different uses of JSNI?
JSNI is a web equivalent of inline assembly code and can use in many ways such as: