পৃষ্ঠাসমূহ

Search Your Article

CS

Pageviews

Showing posts with label GWT Tutorial. Show all posts
Showing posts with label GWT Tutorial. Show all posts

Tuesday, February 21, 2017

GWT - Overview

What is 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.

GWT - Environment Setup

This tutorial will guide you on how to prepare a development environment to start your work with GWT Framework. This tutorial will also teach you how to setup JDK, Tomcat and Eclipse on your machine before you setup GWT Framework:

GWT - Applications

Before we start with creating actual HelloWorld application using GWT, let us see what are the actual parts 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:

GWT - Create Application

As power of GWT lies in Write in Java, Run in JavaScript, we'll be using Java IDE Eclipse to demonstrate our examples. Let's start with a simple HelloWorld application:

GWT - Deploy Application

This tutorial will explain you how to create an application war file and how to deploy that in Apache Tomcat Websever root. If you understood this simple example then you will also be able to deploy a complex GWT application following the same steps.

GWT - Style with CSS

GWT widgets rely on cascading style sheets (CSS) for visual styling. 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. In order to give all buttons and text boxes a larger font, you could put the following rule in your application's CSS file:

GWT - Basic Widgets

Every user interface considers the following three main aspects:
  • UI elements : Thes are the core visual elements the user eventually sees and interacts with. GWT provides a huge list of widely used and common elements varying from basic to complex which we will cover in this tutorial.

GWT - Form Widgets

Form widgets allows users to input data and provides them interaction capability with the application. Every Form widget inherits properties from Widget class which in turn inherits properties from UIObject and Wigdet classes.

GWT - Complex Widgets

Complex widgets allows users to advanced interaction capability with the application. Every Complex widget inherits properties from Widget class which in turn inherits properties from UIObject.

GWT - Layout Panels

Layout Panels can contain other widgets. These panels controls the way widgets to be shown 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.

GWT - Event Handling

GWT provides a event handler model similar to Java AWT or SWING User Interface frameworks.
  • A listener interface defines one or more methods that the widget calls to announce an event. GWT provides a list of interfaces corresponding to various possible events.

GWT - Custom Widgets

GWT provides three ways to create custom user interface elements. There are three general strategies to follow:
  • Create a widget by extending Composite Class: This is the most common and easiest way to create custom widgets. Here you can use existing widgets to create composite view with custom properties.

GWT - UiBinder

Introduction

  • The UiBinder is a framework designed to separate Functionality and View of User Interface.
  • The UiBinder framework allows developers to build gwt applications as HTML pages with GWT widgets configured throughout them.

GWT - RPC Communication

A GWT based application is generally consists of a client side module and server side module. Client side code runs in browser and server side code runs in web server. Client side code has to make an HTTP request accross the network to access server side data.

GWT - JUnit Integration

GWT provides execellent support for automated testing of client side code using JUnit testing framework. In this article we'll demonstrate GWT and JUNIT integration.

Download Junit archive

JUnit Official Site: http://www.junit.org
Download Junit-4.10.jar

GWT - Debugging Application

GWT provides execellent capability of debugging client side as well as server side code.
  • During development mode, GWT Application is in Java code based and is not translated to JavaScript.

GWT - Internationalization

GWT provides three ways to internationalize a GWT application, We'll demonstrate use of Static String Internationalization being most commonly used among projects.

GWT - History Class

GWT applications are normally single page application running JavaScripts and do not contains lot of pages thus browser do not keep track of user interaction with Application. To use browser's history functionality, application should generate a unique URL fragment for each navigable page.

GWT - Bookmark Support

GWT supports browser history management using a History class for which you can reference GWT - History Class chapter.
GWT uses a term token which is simply a string that the application can parse to return to a particular state. Application will save this token in browser's history as URL fragment.

GWT - Logging Framework

The logging framework emulates java.util.logging, so it uses the same syntax and has the same behavior as server side logging code
GWT logging is configured using .gwt.xml files.