Wednesday, 13 June 2012

Gwt For java Development

For GWT Tutorials Fallow the below link.

1.https://developers.google.com/web-toolkit/tools/gwtdesigner/tutorials/loginmanager

2.http://www.pjug.org/docs/gwt092008.pdf




GWT INTERVIEW QUESTIONS:

1. How to create custom widgets in GWT?
Ans:
Create a class that should extends Composite class of GWT. 
Inside the constructor you can write you logic to create a widget and call the initWidget method().
Then you can use this class in anywhere in the application and add this widget in any panels.

2. What is the advantage of using Cell Widgets in GWT and Why?
Why we need to use CellTable instead FlexTable or GRID?
Ans:
CellTable gives the following features
Pagination

Default Header and Footer - Using DataGrid
Column Sorting
Column Width setting
You can even create Custom Cells

3.What is AsyncDataProvider in GWT cell widgets? 
Ans:
When you want to display dynamic data or a range of data, not just a static list, then we should use AsyncDataProvider.

4.GWT ClientBundle: 

In GWT we can use ClientBundle to load all the images and CSS files in one single file and use it anywhere in the application. It provides flexible way to get the resources.

1. It creates a single image from the collection of images at compile time to reduce the image size.

2. Enable more aggressive caching headers for program resources. It will go to server for every-time to get the images.
3.Eliminate mismatches between physical file names and constants in Java code by performing consistency checks during the compile.
5.Server side communication:

-- > Using GWT RPC

-- > Using RequestBuilder.

         To use RequestBuilder we need to inherit HTTP Module in module.xml file
        
         à  <inherits name="com.google.gwt.http.HTTP"/>
        
à   Using Command Pattern (GWTP Dispatcher)

6.What are some advantages for the Model-View-Presenter pattern?
What is Entry-point class in GWT and how to configure this? 
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.
7.How to add the print Option in GWT?

 Ans:)For solution fallow the below site.

http://vegdave.wordpress.com/2012/07/16/adding-print-feature-to-a-gwt-app/