The largest Interview Solution Library on the web


Interview Questions
« Previous | 0 | 1 | 2 | 3 | 4 | Next »

1.What is GWT?

Google Web Toolkit GWT is a development toolkit for building and optimizing complex browserbased applications. GWT is used by many products at Google, including Google AdWords and Orkut.

2.What are the features of GWT?

Following are the features of GWT −

  • Google Web Toolkit GWT is a development toolkit to create RICH Internet ApplicationRIA.
  • GWT provides developers option to write client side application in JAVA.
  • GWT compiles the code written in JAVA to JavaScript code.
  • Application written in GWT is cross-browser compliant. GWT automatically generates
  • javascript code suitable for each browser.
  • GWT is open source, completely free, and used by thousands of developers around the
  • world. It is licensed under the Apache License version 2.0.

3.Why we should use GWT?

Following are the reasons to prefer GWT for development projects −

  • Being Java based, you can use JAVA IDEs like Eclipse to develop GWT applcation. Developers can use code auto-complete/refactoring/navigation/project management and all features of IDEs.
  • GWT provides full debugging capability. Developers can debug the client side application just as an Java Application.
  • GWT provides easy integration with Junit and Maven.
  • Again being Java based, GWT has a low learning curve for Java Developers.
  • GWT generates optimized javascript code, produces browser's specific javascript code by self.
  • GWT provides Widgets library provides most of tasks required in an application.
  • GWT is extensible and custom widget can be created to cater to application needs.
  • On top of everything, GWT applications can run on all major browsers and smart phones including Android and iOS based phones/tablets.

4.What are the disadvantages of GWT?

Following are the disadvantages of GWT −

  • Not indexable − Web pages generated by GWT would not be indexed by search engines because these applications are generated dynamically.

  • Not degradable −If your application user disables Javascript then user will just see the basic page and nothing more.

  • Not designer's friendly − GWT is not suitable for web designers who prefer using plain HTML with placeholders for inserting dynamic content at later point in time.

5.What are the core components of GWT?

Following are the core components of GWT −

  • GWT Java to JavaScript compiler − This is the most important part of GWT which makes it a powerful tool for building RIAs. The GWT compiler is used to translate all the application code written in Java into JavaScript.

  • JRE Emulation library − Google Web Toolkit includes a library that emulates a subset of the Java runtime library. The list includes java.lang, java.lang.annotation, java.math, java.io, java.sql, java.util and java.util.logging.

  • GWT UI building library − This part of GWT consists of many subparts which includes the actual UI components, RPC support, History management, and much more.

  • GWT Hosted Web Browser − GWT Hosted Web Browser lets you run and execute your GWT applications in hosted mode, where your code runs as Java in the Java Virtual Machine without compiling to JavaScript.

6.What are the components of a GWT application?

A GWT application consists of following four important parts out of which last part is optional but
first three parts are mandatory −

  • Module descriptors
  • Public resources
  • Client-side code
  • Server-side code

7.What is Module descriptor in GWT?

A module descriptor is the configuration file in the form of XML which is used to configure a GWT application. A module descriptor file extension is *.gwt.xml, where * is the name of the application and this file should reside in the project's root.

8.What is the purpose of 'module' tag in *.gwt.xml file in GWT?

This provides name of the application.

9.What is the purpose of 'inherits' tag in *.gwt.xml file in GWT?

This adds other gwt module in application just like import does in java applications. Any number of modules can be inherited in this manner.

10.What is the purpose of 'entry-point' tag in *.gwt.xml file in GWT?

This specifies the name of class which will start loading the GWT Application.

11.Can you have multiple entry-point classes in a *.gwt.xml file?

Yes! Any number of entry-point classes can be added.

12.Which method of a entry-point class is called when GWT application starts?

onModuleLoad function gets called and acts similar to main method of a java application.

13.How onModuleLoad functions get called if multiple entry-point classes are specified in *.gwt.xml?

They are called sequentially in the order in which entry-point classes appear in the module file. So when the onModuleLoad of your first entry point finishes, the next entry point is called immediately.

14.What is the purpose of 'source' tag in *.gwt.xml file in GWT?

This specifies the names of source folders which GWT compiler will search for source compilation.

15.What is the purpose of 'public' tag in *.gwt.xml file in GWT?

The public path is the place in your project where static resources referenced by your GWT module, such as CSS or images, are stored.

16.What is default public path for static resources in GWT application?

The default public path is the public subdirectory underneath where the Module XML File is stored.

17.What is the purpose of 'script' tag in *.gwt.xml file in GWT?

Automatically injects the external JavaScript file located at the location specified by src.

18.What is the purpose of 'stylesheet' tag in *.gwt.xml file in GWT?

Automatically injects the external CSS file located at the location specified by src.

19.What is an entry-point class?

A module entry-point is any class that is assignable to EntryPoint and that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its EntryPoint.onModuleLoad method gets called.

20.What is *.nocache.js file in GWT?

It contains the javascript code required to resolve deferred binding configuarations forexample, browserdetection and to use lookup table generated by GWT compiler to locate one of the .cache.html.

« Previous | 0 | 1 | 2 | 3 | 4 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com