Google Web Toolkit (GWT) Interview Questions for freshers/Google Web Toolkit (GWT) Interview Questions and Answers for Freshers & Experienced

What Is The Purpose Of 'access-point' Tag In *.Gwt.Xml File In Gwt?

This specifies the name of class if you want to start loading the GWT Application.

Posted Date:- 2021-12-01 10:08:46

What is Deferred Binding?

Deferred Binding is GWT’s answer to Java reflection. Every web browser has its own idiosyncrasies, usually lots of them. The standard Java way of dealing with idiosyncrasies would be to encapsulate the custom code into subclasses, with one subclass for each supported browser. At runtime, the application would use reflection and dynamic classloading to select the appropriate subclass for the current environment, load the class, create an instance, and then use that instance as the service provider for the duration of the program.

This is indeed what GWT does. However, the JavaScript environment in which GWT applications ultimately run simply does not support dynamic classloading (also known as dynamic binding.) Because dynamic binding is unavailable as a technique to GWT, GWT instead uses deferred binding. One way to think of this is as “dynamic class-loading that occurs at compile time instead of execution time.” When the GWT Compiler compiles the Java application, it determines all the different “idiosyncrasies” that it must support, and generates a separate, tightly streamlined version of the application for that specific configuration. For example, it generates a different version of the application file for Firefox than it does for Opera.

The GWT Compiler uses Deferred Binding to generate a completely separate version of the application for each language.

Posted Date:- 2021-12-01 10:07:42

What are the features of GWT

Google Web Toolkit (GWT) is a development toolkit to create RICH Internet Application. GWT provides developers option to write client side application in Java. Application written in GWT is cross-browser compliant. GWT automatically generates javascript code suitable for each browser,.

Posted Date:- 2021-12-01 10:06:30

How is GWT different from other frameworks?

GWT provides a set of ready-to-use user interface widgets that we can immediately utilize to create new applications. It also provides a simple way to create innovative widgets by combining the existing ones. We can use IDE to create, debug, and unit-test our AJAX applications. We can build RPC services to provide certain functionalities that can be accessed asynchronously from the web applications easily using the GWT RPC framework.

GWT enables us to integrate easily with servers written in other languages, so we can quickly enhance our applications to provide a much better user experience by utilizing the AJAX framework. GWT has the Java-to-JavaScript compiler to distill our application into a set of JavaScript and HTML files that we can serve with any web server. This gives us a great feature browser compatibility.

Posted Date:- 2021-12-01 10:05:21

What is the purpose of Label widget of a GWT?

This widget contains text, not interpreted as HTML using a <div>element, causing it to be displayed with block layout.

Posted Date:- 2021-12-01 10:04:04

What are Layout Panels?

Layout Panels can contain other widgets. These panels controls 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.

Posted Date:- 2021-12-01 10:03:05

What is GWT RPC

The GWT RPC framework makes it easy for the client and server components of web application to exchange Java objects over HTTP. The server-side code that gets invoked from the client is often referred to as a service. The implementation of the GWT RPC service is based on a Servlet architecture. Within a client code, we will use a automatically generated proxy class to make calls to the service. GWT will handle serialization of the Java objects. GWT RPC service is different from SOAP and REST.

Posted Date:- 2021-12-01 10:01:11

What is the Same Origin Policy, and how does it affect GWT?

Modern browsers implement a security model known as the Same Origin Policy (SOP). Conceptually, it is very simple, but the limitations it applies to JavaScript applications can be quite subtle. Simply stated, the SOP states that JavaScript code running on a web page may not interact with any resource not originating from the same web site. The reason this security policy exists is to prevent malicious web coders from creating pages that steal web users’ information or compromise their privacy. While very necessary, this policy also has the side effect of making web developers’ lives difficult.

It’s important to note that the SOP issues are not specific to GWT; they are true of any AJAX application or framework.

Posted Date:- 2021-12-01 09:59:53

Which class is the superclass of all user-interface classes?

The class UIObject is the superclass for all user-interface objects.

Posted Date:- 2021-12-01 09:58:54

How you can attach a CSS file with your GWT module?

There are multiple approaches for associating CSS files with your module. Modern GWT applications typically use a combination of CssResource and UiBinder.

* Using a <link> tag in the host HTML page.

* Using the <stylesheet> element in the module XML file.

* Using a CssResource contained within a ClientBundle.

* Using an inline <ui:style> element in a UiBinder template.

Posted Date:- 2021-12-01 09:57:05

What is the difference between primary style and secondary styles of a GWT Widget?

By default, the primary style name of a widget will be the default style name for its widget class. For example, gwt-Button for Button widgets. When we add and remove style names using AddStyleName() method, those styles are called secondary styles.

The final appearance of a widget is determined by the sum of all the secondary styles added to it, plus its primary style. You set the primary style of a widget with the setStylePrimaryName(String) method.

Posted Date:- 2021-12-01 09:55:32

What is the purpose of setStylePrimaryName() function of a GWT widget?

This method sets the object's primary style name and updates all dependent style names.

Posted Date:- 2021-12-01 09:54:44

What is the purpose of removeStyleName() function of a GWT widget?

This method will remove given style from the widget and leaves any others associated with the widget.

Posted Date:- 2021-12-01 09:54:02

What is the purpose of addStyleName() function of a GWT widget?

This method will add a secondary or dependent style name to the widget. A secondary style name is an additional style name that is,so if there were any previous style names applied they are kept.

Posted Date:- 2021-12-01 09:53:20

What Is The Purpose Of 'inherits' Tag In *.Gwt.Xml File In Gwt?

This adds different gwt module in application just like import does in java programs. Any quantity of modules may be inherited in this manner.

Posted Date:- 2021-12-01 09:52:42

What is a UiBinder?

UiBinder provides a declarative way of defining User Interface. It helps to separate the programming logic from the UI.

Posted Date:- 2021-12-01 09:51:32

How to create custom widgets in GWT?

There are three general strategies to follow:

Create a widget that is a composite of existing widgets. The most effective way to create new widgets is to extend the Composite class. A composite is a specialized widget that can contain another component (typically, a Panel) but behaves as if it were its contained widget. We can easily combine groups of existing widgets into a composite that is itself a reusable widget. Some of the UI components provided in GWT are composites: for example, the TabPanel (a composite of a TabBar and a DeckPanel) and the SuggestBox. Rather than create complex widgets by subclassing Panel or another Widget type, it’s better to create a composite because a composite usually wants to control which methods are publicly accessible without exposing those methods that it would inherit from its Panel superclass.

Create an entirely new widget written in the Java language. It is also possible to create a widget from scratch, although it is trickier since we have to write code at a lower level. Many of the basic widgets are written this way, such as Button and TextBox.

Create a widget that wraps JavaScript using JSNI methods. When implementing a custom widget that derives directly from the Widget base class, we may also write some of the widget’s methods using JavaScript. This should generally only be done as a last resort, as it becomes necessary to consider the cross-browser implications of the native methods that we write, and also becomes more difficult to debug.

Posted Date:- 2021-12-01 09:50:54

What is DataResource in GWT?

A DataResource is the simplest of the resource types, offering a URL by which the contents of a file can be retrieved at runtime. The main optimization offered is to automatically rename files based on their contents in order to make the resulting URL strongly-cacheable by the browser. Very small files may be converted into data: URLs on those browsers that support them.

Posted Date:- 2021-12-01 09:50:01

What is GWT ClientBundle?

The resources in a deployed GWT application can be roughly categorized into resources to never cache (.nocache.js), to cache forever (.cache.html), and everything else (myapp.css). The ClientBundle interface moves entries from the everything-else category into the cache-forever category.

Posted Date:- 2021-12-01 09:49:14

Why doesn’t GWT provide a synchronous server connection option?

GWT’s network operations are all asynchronous, or non-blocking. That is, they return immediately as soon as called, and require the user to use a callback method to handle the results when they are eventually returned from the server. Though in some cases asynchronous operations are less convenient to use than synchronous operations, GWT does not provide synchronous operations.

The reason is that most browsers’ JavaScript engines are single-threaded. As a result, blocking on a call to XMLHTTPRequest also blocks the UI thread, making the browser appear to freeze for the duration of the connection to the server. Some browsers provide a way around this, but there is no universal solution. GWT does not implement a synchronous network connection because to do so would be to introduce a feature that does not work on all browsers, violating GWT’s commitment to no-compromise, cross-browser AJAX. It would also introduce complexity for developers, who would have to maintain two different versions of their communications code in order to handle all browsers.

Posted Date:- 2021-12-01 09:48:25

How can you set Browser targeted Compilation in GWT?

To reduce the compilation time, choose favorite browser and add the user.agent property in the module configuration file.

Posted Date:- 2021-12-01 09:47:47

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.

Posted Date:- 2021-12-01 09:46:42

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.

Posted Date:- 2021-12-01 09:46:04

Why should a .nocache.js file never be cached?

GWT compiler generates .nocache.js file every time with the same name whenever a GWT application is compiled. So browser should always download the .nocache.js file to get the latest gwt application. gwt.js code actually appends a unique timestamp at the end of the file name so that browser always treat it a new file and should never cache it.

Posted Date:- 2021-12-01 09:45:01

What is .cache.html file in GWT?

It contains the actual program of a GWT application.

Posted Date:- 2021-12-01 09:44:17

What is *.nocache.js file in GWT?

It contains the javascript code required to resolve deferred binding configuarations (for example, browser detection) and to use lookup table generated by GWT compiler to locate one of the .cache.html.

Posted Date:- 2021-12-01 09:43:20

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.

Posted Date:- 2021-12-01 09:42:43

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.

Posted Date:- 2021-12-01 09:42:15

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.

Posted Date:- 2021-12-01 09:41:41

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.

Posted Date:- 2021-12-01 09:40:26

What are requirements to install GWT?

Requirements to install GWT:

* To install GWT, first install JDK Java Development Kit on your system as GWT is based on Java.
* JDK should be of version 1.6 or higher than this.
* No minimum requirement of memory, disk space, and operating system
* Install JRE and Eclipse
* Finally, install GWT SDK and plugins and then set up Apache.

Posted Date:- 2021-12-01 09:39:35

What is the difference between TextResource and ExternalTextResource

The related resource types TextResource and ExternalTextResource provide access to static text content. The main difference between these two types is that the former interns the text into the compiled JavaScript, while the latter bundles related text resources into a single file, which is accessed asynchronously.

Posted Date:- 2021-12-01 09:37:39

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 in French for the user accessing the website from France.

Posted Date:- 2021-12-01 09:37:13

What is the default style name of any GWT widget?

By default, the class name for each component is gwt-<classname>. For example, the Button widget has a default style of gwt-Button and similar way TextBox widgest has a default style of gwt-TextBox.

Posted Date:- 2021-12-01 09:36:24

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.

Posted Date:- 2021-12-01 09:35:28

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.

Posted Date:- 2021-12-01 09:34:43

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.

Posted Date:- 2021-12-01 09:33:37

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.

Posted Date:- 2021-12-01 09:29:55

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

This provides name of the application.

Posted Date:- 2021-12-01 09:29:17

How do I enable assertions?

The GWT compiler recognizes the -ea flag to generate code for assertions in the compiled JavaScript. Only use assertions for debugging purposes, not production logic because assertions will only work under GWT’s development mode. By default, they are compiled away by the GWT compiler so do not have any effect in production mode unless we explicitly enable them.

Posted Date:- 2021-12-01 09:29:00

Which method of the Entry point class is called when the GWT application is loaded? What happens if there are multiple Entry point classes?

onModuleLoad(). If there are more than one Entry point classes then each of then gets called in the sequence in which they are defined in the configuration file.

Posted Date:- 2021-12-01 09:28:41

What Is Module Descriptor In Gwt?

A module descriptor is the configuration record within the form of XML which is used to configure a GWT utility. A module descriptor file extension is *.Gwt.Xml, in which * is the name of the software and this report need to reside inside the mission's root.

Posted Date:- 2021-12-01 09:28:19

What Are The Components Of A Gwt Application?

A GWT application includes following four vital parts out of which ultimate component is non-obligatory however first three components are mandatory −Module descriptors
Public sources
Client-facet code
Server-facet code

Posted Date:- 2021-12-01 09:27:59

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.

Posted Date:- 2021-12-01 09:27:10

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 the same thing. A GWT module is named similarly to a Java package in that it follows the usual dotted-path naming convention. For example, most of the standard GWT modules are located underneath “com.google.gwt” However, the similarity between GWT modules and Java packages ends with this naming convention.

A module is defined by an XML descriptor file ending with the extension “.gwt.xml”, and the name of that file determines the name of the module. For example, if we have a file named src/com/mycompany/apps/MyApplication.gwt.xml, then that will create a GWT module named com.mycompany.apps.MyApplication. The contents of the .gwt.xml file specify the precise list of Java classes and other resources that are included in the GWT module.

Posted Date:- 2021-12-01 09:26:51

What is a module descriptor in GWT application?

A module descriptor is a configuration file used to set-up a GWT application.

Posted Date:- 2021-12-01 09:26:32

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

Posted Date:- 2021-12-01 09:26:18

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.

Posted Date:- 2021-12-01 09:24:54

What are the features of GWT?

Following are the features of GWT −

* Google Web Toolkit (GWT) is a development toolkit to create RICH Internet Application(RIA).

* 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.

Posted Date:- 2021-12-01 09:24:15

What is GWT?

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

Posted Date:- 2021-12-01 09:23:33

Search
R4R Team
R4R provides Google Web Toolkit (GWT) Freshers questions and answers (Google Web Toolkit (GWT) Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,Google Web Toolkit (GWT) Interview Questions for freshers,Google Web Toolkit (GWT) Freshers & Experienced Interview Questions and Answers,Google Web Toolkit (GWT) Objetive choice questions and answers,Google Web Toolkit (GWT) Multiple choice questions and answers,Google Web Toolkit (GWT) objective, Google Web Toolkit (GWT) questions , Google Web Toolkit (GWT) answers,Google Web Toolkit (GWT) MCQs questions and answers R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for Google Web Toolkit (GWT) fresher interview questions ,Google Web Toolkit (GWT) Experienced interview questions,Google Web Toolkit (GWT) fresher interview questions and answers ,Google Web Toolkit (GWT) Experienced interview questions and answers,tricky Google Web Toolkit (GWT) queries for interview pdf,complex Google Web Toolkit (GWT) for practice with answers,Google Web Toolkit (GWT) for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .