GWT Quick Guide

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

Overall, GWT is a framework to build large scale and high performance web appliation while keeping them as easy-to-maintain.

Why to use GWT?

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

Disadvantages of GWT

Though GWT comes with lots of plus points but same time we should consider the following points:

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

The GWT Components

The GWT framework can be divided into following three major parts:

  • 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 also provides a GWT Hosted Web Browser which 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.

 

Get Contact Details Android

العربية: Android logo
Get Contact Details (ID, Name, Phone, Photo)

res/layout/main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent" >
    <Button android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Select a Contact"
            android:onClick="onClickSelectContact" />
    <ImageView android:id="@+id/img_contact"
               android:layout_height="wrap_content"
               android:layout_width="match_parent"
               android:adjustViewBounds="true"
               android:contentDescription="Contacts Image"
                />
</LinearLayout>

Read More »

Android Voice Recognition

You may have heard about the “ Google Now project” where you give the voice command and Android fetches result for you. It recognizes your voice and converts it into the text or takes the appropriate action. Have you ever thought how is it done? If your answer is voice recognition API, then you are absolutly right. Recently while playing with Android voice recognition APIs, I found some interesting stuffs. APIs are really easy to use with application. Given below is a small tutorial on voice/speech recognition API. The final application will look similar to that of application shown below. The application may not work on the Android Emulator because it doesn’t support voice recognition. But the same can work on the phone.

Read More »

 

Printing in Android Application

My this post is based on “How to Integrate printer in android app”. the best way of doing that Google cloud printing. Google provide us Print Dialog code, we can use it in our application. 1)Login with your gamil-id in your desktop and add your printers in your browser. 2)Create a demo app and put below code. 3)Add Internet permissions…

combine

Read More »

Merge two image in android

Last exercise combine two image side-by-side. In this post, the two images overlap with alpha setting. The layout is same as in last exercise “Combine bitmap side-by-side“. Main code: package com.test.androidimageprocessing; import java.io.FileNotFoundException; import android.net.Uri; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageView; import…

Read More »

Microsoft and Client Remote Desktop for Android

Before establish connection between host PC and remote client app, you have to setup in both PC side and client side.

Set up your Remote Desktop in host PC. (This example running Windows 8.1 Pro)

– Enter “Remote Desktop” in Search, select “Select users who can use remote desktop“.

– Under Remote tab, enable “Allow remote connections to this computer” under Remote Desktop. Click the “Select Users” button.

Read More »

Setup Google Play services SDK in Eclipse

google-play-logo11

The Google Play services SDK is an extension to the Android SDK and is available as a downloadable package from the SDK Manager. The download includes the client library and code samples. To develop using the Google Play services APIs, you must download the Google Play services SDK. Google Play services is not supported on the Android emulator, a physical…

Read More »

How to Install Android OS on your PC


Google’s Android is an operating system and software stack for mobile devices. Under the hood, it uses a customized version of the Linux kernel. Android is currently the fastest growing mobile operating system and is generating quite the buzz. If you are curious about it, you can give it a try without having to buy an Android smartphone. Let me tell how to do it.
LiveAndroid is a project that provides a LiveCD for Android running on x86 platforms. With a Live CD (or Live Distribution) you are able to test an operating system without altering the already installed OS or any files existing on the computer’s storage devices. The user can return his PC to its previous state when he is done with the LiveCD. LiveAndroid does not fully support the Android OS, but the most important stuff are included in the distribution (with more added with each release)………

Read More »

 

Blur Mask Filter in Android

AndroidDrawBitmap_BlurMaskFilter

This takes a mask, and blurs its edge by the specified radius. Whether or or not to include the original mask, and whether the blur goes outside, inside, or straddles, the original mask’s border, is controlled by the Blur enum. package com.example.androiddrawbitmap; import java.io.FileNotFoundException; import android.net.Uri; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BlurMaskFilter; import android.graphics.Canvas;…

Read More »

 

Creating a Mobile Event Calendar

Mobile-Calendar_Preview
This tutorial describes how to build an HTML5-based mobile calendar to track conferences and events that run on iOS and Android phones using a mobile version of dhtmlxScheduler (open source, GPL). At the end, users will be able to add and edit events, select the conference location on Google Maps, and see the events in day, month, or list views….

Read More »